<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/sched.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/sched.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="Maybe">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX1NDSEVEX0hfMA__"><span class="b">_LINUX_SCHED_H</span></a>
<a name="2" /><span class="Maybe">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX1NDSEVEX0hfMA__"><span class="b">_LINUX_SCHED_H</span></a>
<a name="3" /><span class="Maybe">       3:</span> 
<a name="4" /><span class="Maybe">       4:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">uapi</span><span class="f">/</span><span class="b">linux</span><span class="f">/</span><span class="b">sched</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="5" /><span class="Maybe">       5:</span> 
<a name="6" /><span class="Maybe">       6:</span> 
<a name="7" /><span class="Maybe">       7:</span> <span class="m">struct</span> <span class="b">sched_param</span> <span class="f">{</span>
<a name="8" /><span class="Maybe">       8:</span>     <span class="m">int</span> <span class="b">sched_priority</span><span class="f">;</span>
<a name="9" /><span class="Maybe">       9:</span> <span class="f">}</span><span class="f">;</span>
<a name="10" /><span class="Maybe">      10:</span> 
<a name="11" /><span class="Maybe">      11:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">param</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>    <span class="k">/* for HZ */</span>
<a name="12" /><span class="Maybe">      12:</span> 
<a name="13" /><span class="Maybe">      13:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">capability</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="14" /><span class="Maybe">      14:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">threads</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="15" /><span class="Maybe">      15:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">kernel</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="16" /><span class="Maybe">      16:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="17" /><span class="Maybe">      17:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">timex</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="18" /><span class="Maybe">      18:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">jiffies</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="19" /><span class="Maybe">      19:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rbtree</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="20" /><span class="Maybe">      20:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">thread_info</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="21" /><span class="Maybe">      21:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">cpumask</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="22" /><span class="Maybe">      22:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">errno</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="23" /><span class="Maybe">      23:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">nodemask</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="24" /><span class="Maybe">      24:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">mm_types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="25" /><span class="Maybe">      25:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">preempt_mask</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="26" /><span class="Maybe">      26:</span> 
<a name="27" /><span class="Maybe">      27:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">page</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="28" /><span class="Maybe">      28:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">ptrace</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="29" /><span class="Maybe">      29:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">cputime</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="30" /><span class="Maybe">      30:</span> 
<a name="31" /><span class="Maybe">      31:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">smp</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="32" /><span class="Maybe">      32:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">sem</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="33" /><span class="Maybe">      33:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">signal</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="34" /><span class="Maybe">      34:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">compiler</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="35" /><span class="Maybe">      35:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">completion</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="36" /><span class="Maybe">      36:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">pid</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="37" /><span class="Maybe">      37:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">percpu</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="38" /><span class="Maybe">      38:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">topology</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="39" /><span class="Maybe">      39:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">proportions</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="40" /><span class="Maybe">      40:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">seccomp</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="41" /><span class="Maybe">      41:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rcupdate</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="42" /><span class="Maybe">      42:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rculist</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="43" /><span class="Maybe">      43:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rtmutex</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="44" /><span class="Maybe">      44:</span> 
<a name="45" /><span class="Maybe">      45:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">time</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="46" /><span class="Maybe">      46:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">param</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="47" /><span class="Maybe">      47:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">resource</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="48" /><span class="Maybe">      48:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">timer</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="49" /><span class="Maybe">      49:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">hrtimer</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="50" /><span class="Maybe">      50:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">task_io_accounting</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="51" /><span class="Maybe">      51:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">latencytop</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="52" /><span class="Maybe">      52:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">cred</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="53" /><span class="Maybe">      53:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">llist</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="54" /><span class="Maybe">      54:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">uidgid</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="55" /><span class="Maybe">      55:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">gfp</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="56" /><span class="Maybe">      56:</span> 
<a name="57" /><span class="Maybe">      57:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">processor</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="58" /><span class="Maybe">      58:</span> 
<a name="59" /><span class="Maybe">      59:</span> <span class="m">struct</span> <span class="b">exec_domain</span><span class="f">;</span>
<a name="60" /><span class="Maybe">      60:</span> <span class="m">struct</span> <span class="b">futex_pi_state</span><span class="f">;</span>
<a name="61" /><span class="Maybe">      61:</span> <span class="m">struct</span> <span class="b">robust_list_head</span><span class="f">;</span>
<a name="62" /><span class="Maybe">      62:</span> <span class="m">struct</span> <span class="b">bio_list</span><span class="f">;</span>
<a name="63" /><span class="Maybe">      63:</span> <span class="m">struct</span> <span class="b">fs_struct</span><span class="f">;</span>
<a name="64" /><span class="Maybe">      64:</span> <span class="m">struct</span> <span class="b">perf_event_context</span><span class="f">;</span>
<a name="65" /><span class="Maybe">      65:</span> <span class="m">struct</span> <span class="b">blk_plug</span><span class="f">;</span>
<a name="66" /><span class="Maybe">      66:</span> 
<a name="67" /><span class="Maybe">      67:</span> <span class="k">/*</span>
<a name="68" /><span class="Maybe">      68:</span> <span class="k"> * List of flags we want to share for kernel threads,</span>
<a name="69" /><span class="Maybe">      69:</span> <span class="k"> * if only because they are not used by them anyway.</span>
<a name="70" /><span class="Maybe">      70:</span> <span class="k"> */</span>
<a name="71" /><span class="Maybe">      71:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Q0xPTkVfS0VSTkVMXzA_"><span class="b">CLONE_KERNEL</span></a>    <span class="f">(</span><a href="cpu.c_macros_noref.html#_Q0xPTkVfRlNfMA__"><span class="b">CLONE_FS</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_Q0xPTkVfRklMRVNfMA__"><span class="b">CLONE_FILES</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_Q0xPTkVfU0lHSEFORF8w"><span class="b">CLONE_SIGHAND</span></a><span class="f">)</span>
<a name="72" /><span class="Maybe">      72:</span> 
<a name="73" /><span class="Maybe">      73:</span> <span class="k">/*</span>
<a name="74" /><span class="Maybe">      74:</span> <span class="k"> * These are the constant used to fake the fixed-point load-average</span>
<a name="75" /><span class="Maybe">      75:</span> <span class="k"> * counting. Some notes:</span>
<a name="76" /><span class="Maybe">      76:</span> <span class="k"> *  - 11 bit fractions expand to 22 bits by the multiplies: this gives</span>
<a name="77" /><span class="Maybe">      77:</span> <span class="k"> *    a load-average precision of 10 bits integer + 11 bits fractional</span>
<a name="78" /><span class="Maybe">      78:</span> <span class="k"> *  - if you want to count load-averages more often, you need more</span>
<a name="79" /><span class="Maybe">      79:</span> <span class="k"> *    precision, or rounding will get you. With 2-second counting freq,</span>
<a name="80" /><span class="Maybe">      80:</span> <span class="k"> *    the EXP_n values would be 1981, 2034 and 2043 if still using only</span>
<a name="81" /><span class="Maybe">      81:</span> <span class="k"> *    11 bit fractions.</span>
<a name="82" /><span class="Maybe">      82:</span> <span class="k"> */</span>
<a name="83" /><span class="Maybe">      83:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">avenrun</span><span class="f">[</span><span class="f">]</span><span class="f">;</span>        <span class="k">/* Load averages */</span>
<a name="84" /><span class="Maybe">      84:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">get_avenrun</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">loads</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">shift</span><span class="f">)</span><span class="f">;</span>
<a name="85" /><span class="Maybe">      85:</span> 
<a name="86" /><span class="Maybe">      86:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNISUZUXzA_"><span class="b">FSHIFT</span></a>        <span class="c">11</span>        <span class="k">/* nr of bits of precision */</span>
<a name="87" /><span class="Maybe">      87:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RklYRURfMV8w"><span class="b">FIXED_1</span></a>        <span class="f">(</span><span class="c">1</span><span class="f">&lt;&lt;</span><a href="cpu.c_macros_noref.html#_RlNISUZUXzA_"><span class="b">FSHIFT</span></a><span class="f">)</span>    <span class="k">/* 1.0 as fixed-point */</span>
<a name="88" /><span class="Maybe">      88:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TE9BRF9GUkVRXzA_"><span class="b">LOAD_FREQ</span></a>    <span class="f">(</span><span class="c">5</span><span class="f">*</span><a href="cpu.c_macros_ref.html#_SFpfMQ__"><span class="b">HZ</span></a><span class="f">+</span><span class="c">1</span><span class="f">)</span>    <span class="k">/* 5 sec intervals */</span>
<a name="89" /><span class="Maybe">      89:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RVhQXzFfMA__"><span class="b">EXP_1</span></a>        <span class="c">1884</span>        <span class="k">/* 1/exp(5sec/1min) as fixed-point */</span>
<a name="90" /><span class="Maybe">      90:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RVhQXzVfMA__"><span class="b">EXP_5</span></a>        <span class="c">2014</span>        <span class="k">/* 1/exp(5sec/5min) */</span>
<a name="91" /><span class="Maybe">      91:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RVhQXzE1XzA_"><span class="b">EXP_15</span></a>        <span class="c">2037</span>        <span class="k">/* 1/exp(5sec/15min) */</span>
<a name="92" /><span class="Maybe">      92:</span> 
<a name="93" /><span class="Maybe">      93:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Q0FMQ19MT0FEXzA_"><span class="b">CALC_LOAD</span></a><span class="f">(</span><span class="b">load</span><span class="f">,</span><span class="b">exp</span><span class="f">,</span><span class="b">n</span><span class="f">)</span> \
<a name="94" /><span class="Maybe">      94:</span>     <span class="b">load</span> <span class="f">*=</span> <span class="b">exp</span><span class="f">;</span> \
<a name="95" /><span class="Maybe">      95:</span>     <span class="b">load</span> <span class="f">+=</span> <span class="b">n</span><span class="f">*</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_RklYRURfMV8w"><span class="b">FIXED_1</span></a><span class="f">-</span><span class="b">exp</span><span class="f">)</span><span class="f">;</span> \
<a name="96" /><span class="Maybe">      96:</span>     <span class="b">load</span> <span class="f">&gt;&gt;=</span> <a href="cpu.c_macros_noref.html#_RlNISUZUXzA_"><span class="b">FSHIFT</span></a><span class="f">;</span>
<a name="97" /><span class="Maybe">      97:</span> 
<a name="98" /><span class="Maybe">      98:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">total_forks</span><span class="f">;</span>
<a name="99" /><span class="Maybe">      99:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">nr_threads</span><span class="f">;</span>
<a name="100" /><span class="Maybe">     100:</span> <a href="cpu.c_macros_ref.html#_REVDTEFSRV9QRVJfQ1BVXzA_"><span class="b">DECLARE_PER_CPU</span></a><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">process_counts</span><span class="f">)</span><span class="f">;</span>
<a name="101" /><span class="Maybe">     101:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">nr_processes</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="102" /><span class="Maybe">     102:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_running</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="103" /><span class="Maybe">     103:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_iowait</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="104" /><span class="Maybe">     104:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_iowait_cpu</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="105" /><span class="Maybe">     105:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">this_cpu_load</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="106" /><span class="Maybe">     106:</span> 
<a name="107" /><span class="Maybe">     107:</span> 
<a name="108" /><span class="Maybe">     108:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">calc_global_load</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">ticks</span><span class="f">)</span><span class="f">;</span>
<a name="109" /><span class="Maybe">     109:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">update_cpu_load_nohz</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="110" /><span class="Maybe">     110:</span> 
<a name="111" /><span class="Maybe">     111:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">get_parent_ip</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">)</span><span class="f">;</span>
<a name="112" /><span class="Maybe">     112:</span> 
<a name="113" /><span class="Maybe">     113:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">dump_cpu_task</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="114" /><span class="Maybe">     114:</span> 
<a name="115" /><span class="Maybe">     115:</span> <span class="m">struct</span> <span class="b">seq_file</span><span class="f">;</span>
<a name="116" /><span class="Maybe">     116:</span> <span class="m">struct</span> <span class="b">cfs_rq</span><span class="f">;</span>
<a name="117" /><span class="Maybe">     117:</span> <span class="m">struct</span> <span class="b">task_group</span><span class="f">;</span>
<a name="118" /><span class="Maybe">     118:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEX0RFQlVHXzA_"><span class="b">CONFIG_SCHED_DEBUG</span></a>
<a name="119" /><span class="Maybe">     119:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">proc_sched_show_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="b">m</span><span class="f">)</span><span class="f">;</span>
<a name="120" /><span class="Maybe">     120:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">proc_sched_set_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="121" /><span class="Maybe">     121:</span> <span class="m">extern</span> <span class="m">void</span>
<a name="122" /><span class="Maybe">     122:</span> <span class="b">print_cfs_rq</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="b">m</span><span class="f">,</span> <span class="m">int</span> <span class="b">cpu</span><span class="f">,</span> <span class="m">struct</span> <span class="b">cfs_rq</span> <span class="f">*</span><span class="b">cfs_rq</span><span class="f">)</span><span class="f">;</span>
<a name="123" /><span class="Maybe">     123:</span> <span class="f">#</span><span class="n">endif</span>
<a name="124" /><span class="Maybe">     124:</span> 
<a name="125" /><span class="Maybe">     125:</span> <span class="k">/*</span>
<a name="126" /><span class="Maybe">     126:</span> <span class="k"> * Task state bitmask. NOTE! These bits are also</span>
<a name="127" /><span class="Maybe">     127:</span> <span class="k"> * encoded in fs/proc/array.c: get_task_state().</span>
<a name="128" /><span class="Maybe">     128:</span> <span class="k"> *</span>
<a name="129" /><span class="Maybe">     129:</span> <span class="k"> * We have two separate sets of flags: task-&gt;state</span>
<a name="130" /><span class="Maybe">     130:</span> <span class="k"> * is about runnability, while task-&gt;exit_state are</span>
<a name="131" /><span class="Maybe">     131:</span> <span class="k"> * about the task exiting. Confusing, but this way</span>
<a name="132" /><span class="Maybe">     132:</span> <span class="k"> * modifying one set can&apos;t modify the other one by</span>
<a name="133" /><span class="Maybe">     133:</span> <span class="k"> * mistake.</span>
<a name="134" /><span class="Maybe">     134:</span> <span class="k"> */</span>
<a name="135" /><span class="Maybe">     135:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19SVU5OSU5HXzA_"><span class="b">TASK_RUNNING</span></a>        <span class="c">0</span>
<a name="136" /><span class="Maybe">     136:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19JTlRFUlJVUFRJQkxFXzA_"><span class="b">TASK_INTERRUPTIBLE</span></a>    <span class="c">1</span>
<a name="137" /><span class="Maybe">     137:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19VTklOVEVSUlVQVElCTEVfMA__"><span class="b">TASK_UNINTERRUPTIBLE</span></a>    <span class="c">2</span>
<a name="138" /><span class="Maybe">     138:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a>        <span class="c">4</span>
<a name="139" /><span class="Maybe">     139:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a>        <span class="c">8</span>
<a name="140" /><span class="Maybe">     140:</span> <span class="k">/* in tsk-&gt;exit_state */</span>
<a name="141" /><span class="Maybe">     141:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RVhJVF9aT01CSUVfMA__"><span class="b">EXIT_ZOMBIE</span></a>        <span class="c">16</span>
<a name="142" /><span class="Maybe">     142:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RVhJVF9ERUFEXzA_"><span class="b">EXIT_DEAD</span></a>        <span class="c">32</span>
<a name="143" /><span class="Maybe">     143:</span> <span class="k">/* in tsk-&gt;state again */</span>
<a name="144" /><span class="Maybe">     144:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19ERUFEXzA_"><span class="b">TASK_DEAD</span></a>        <span class="c">64</span>
<a name="145" /><span class="Maybe">     145:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a>        <span class="c">128</span>
<a name="146" /><span class="Maybe">     146:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19XQUtJTkdfMA__"><span class="b">TASK_WAKING</span></a>        <span class="c">256</span>
<a name="147" /><span class="Maybe">     147:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19QQVJLRURfMA__"><span class="b">TASK_PARKED</span></a>        <span class="c">512</span>
<a name="148" /><span class="Maybe">     148:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19TVEFURV9NQVhfMA__"><span class="b">TASK_STATE_MAX</span></a>        <span class="c">1024</span>
<a name="149" /><span class="Maybe">     149:</span> 
<a name="150" /><span class="Maybe">     150:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19TVEFURV9UT19DSEFSX1NUUl8w"><span class="b">TASK_STATE_TO_CHAR_STR</span></a> <span class="e">&quot;RSDTtZXxKWP&quot;</span>
<a name="151" /><span class="Maybe">     151:</span> 
<a name="152" /><span class="Maybe">     152:</span> <span class="m">extern</span> <span class="m">char</span> <span class="b">___assert_task_state</span><span class="f">[</span><span class="c">1</span> <span class="f">-</span> <span class="c">2</span><span class="f">*</span><span class="f">!</span><span class="f">!</span><span class="f">(</span>
<a name="153" /><span class="Maybe">     153:</span>         <span class="m">sizeof</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19TVEFURV9UT19DSEFSX1NUUl8w"><span class="b">TASK_STATE_TO_CHAR_STR</span></a><span class="f">)</span><span class="f">-</span><span class="c">1</span> <span class="f">!=</span> <a href="cpu.c_macros_ref.html#_aWxvZzJfMA__"><span class="b">ilog2</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19TVEFURV9NQVhfMA__"><span class="b">TASK_STATE_MAX</span></a><span class="f">)</span><span class="f">+</span><span class="c">1</span><span class="f">)</span><span class="f">]</span><span class="f">;</span>
<a name="154" /><span class="Maybe">     154:</span> 
<a name="155" /><span class="Maybe">     155:</span> <span class="k">/* Convenience macros for the sake of set_task_state */</span>
<a name="156" /><span class="Maybe">     156:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19LSUxMQUJMRV8w"><span class="b">TASK_KILLABLE</span></a>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_VEFTS19VTklOVEVSUlVQVElCTEVfMA__"><span class="b">TASK_UNINTERRUPTIBLE</span></a><span class="f">)</span>
<a name="157" /><span class="Maybe">     157:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19TVE9QUEVEXzA_"><span class="b">TASK_STOPPED</span></a>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a><span class="f">)</span>
<a name="158" /><span class="Maybe">     158:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19UUkFDRURfMA__"><span class="b">TASK_TRACED</span></a>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a><span class="f">)</span>
<a name="159" /><span class="Maybe">     159:</span> 
<a name="160" /><span class="Maybe">     160:</span> <span class="k">/* Convenience macros for the sake of wake_up */</span>
<a name="161" /><span class="Maybe">     161:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19OT1JNQUxfMA__"><span class="b">TASK_NORMAL</span></a>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19JTlRFUlJVUFRJQkxFXzA_"><span class="b">TASK_INTERRUPTIBLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_VEFTS19VTklOVEVSUlVQVElCTEVfMA__"><span class="b">TASK_UNINTERRUPTIBLE</span></a><span class="f">)</span>
<a name="162" /><span class="Maybe">     162:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19BTExfMA__"><span class="b">TASK_ALL</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_VEFTS19OT1JNQUxfMA__"><span class="b">TASK_NORMAL</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a><span class="f">)</span>
<a name="163" /><span class="Maybe">     163:</span> 
<a name="164" /><span class="Maybe">     164:</span> <span class="k">/* get_task_state() */</span>
<a name="165" /><span class="Maybe">     165:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VEFTS19SRVBPUlRfMA__"><span class="b">TASK_REPORT</span></a>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19SVU5OSU5HXzA_"><span class="b">TASK_RUNNING</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_VEFTS19JTlRFUlJVUFRJQkxFXzA_"><span class="b">TASK_INTERRUPTIBLE</span></a> <span class="f">|</span> \
<a name="166" /><span class="Maybe">     166:</span>                  <a href="cpu.c_macros_ref.html#_VEFTS19VTklOVEVSUlVQVElCTEVfMA__"><span class="b">TASK_UNINTERRUPTIBLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a> <span class="f">|</span> \
<a name="167" /><span class="Maybe">     167:</span>                  <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a><span class="f">)</span>
<a name="168" /><span class="Maybe">     168:</span> 
<a name="169" /><span class="Maybe">     169:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dGFza19pc190cmFjZWRfMA__"><span class="b">task_is_traced</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">-&gt;</span><span class="b">state</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a><span class="f">)</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span>
<a name="170" /><span class="Maybe">     170:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dGFza19pc19zdG9wcGVkXzA_"><span class="b">task_is_stopped</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">-&gt;</span><span class="b">state</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a><span class="f">)</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span>
<a name="171" /><span class="Maybe">     171:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dGFza19pc19kZWFkXzA_"><span class="b">task_is_dead</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">exit_state</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span>
<a name="172" /><span class="Maybe">     172:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dGFza19pc19zdG9wcGVkX29yX3RyYWNlZF8w"><span class="b">task_is_stopped_or_traced</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    \
<a name="173" /><span class="Maybe">     173:</span>             <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">-&gt;</span><span class="b">state</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_X19UQVNLX1NUT1BQRURfMA__"><span class="b">__TASK_STOPPED</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span>
<a name="174" /><span class="Maybe">     174:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dGFza19jb250cmlidXRlc190b19sb2FkXzA_"><span class="b">task_contributes_to_load</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    \
<a name="175" /><span class="Maybe">     175:</span>                 <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">-&gt;</span><span class="b">state</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VEFTS19VTklOVEVSUlVQVElCTEVfMA__"><span class="b">TASK_UNINTERRUPTIBLE</span></a><span class="f">)</span> <span class="f">!=</span> <span class="c">0</span> <span class="f">&amp;&amp;</span> \
<a name="176" /><span class="Maybe">     176:</span>                  <span class="f">(</span><span class="b">task</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_UEZfRlJPWkVOXzA_"><span class="b">PF_FROZEN</span></a><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="177" /><span class="Maybe">     177:</span> 
<a name="178" /><span class="Maybe">     178:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19zZXRfdGFza19zdGF0ZV8w"><span class="b">__set_task_state</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">state_value</span><span class="f">)</span>        \
<a name="179" /><span class="Maybe">     179:</span>     <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">state</span> <span class="f">=</span> <span class="f">(</span><span class="b">state_value</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="180" /><span class="Maybe">     180:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2V0X3Rhc2tfc3RhdGVfMA__"><span class="b">set_task_state</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">state_value</span><span class="f">)</span>        \
<a name="181" /><span class="Maybe">     181:</span>     <a href="cpu.c_macros_noref.html#_c2V0X21iXzA_"><span class="b">set_mb</span></a><span class="f">(</span><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">state</span><span class="f">,</span> <span class="f">(</span><span class="b">state_value</span><span class="f">)</span><span class="f">)</span>
<a name="182" /><span class="Maybe">     182:</span> 
<a name="183" /><span class="Maybe">     183:</span> <span class="k">/*</span>
<a name="184" /><span class="Maybe">     184:</span> <span class="k"> * set_current_state() includes a barrier so that the write of current-&gt;state</span>
<a name="185" /><span class="Maybe">     185:</span> <span class="k"> * is correctly serialised wrt the caller&apos;s subsequent test of whether to</span>
<a name="186" /><span class="Maybe">     186:</span> <span class="k"> * actually sleep:</span>
<a name="187" /><span class="Maybe">     187:</span> <span class="k"> *</span>
<a name="188" /><span class="Maybe">     188:</span> <span class="k"> *    set_current_state(TASK_UNINTERRUPTIBLE);</span>
<a name="189" /><span class="Maybe">     189:</span> <span class="k"> *    if (do_i_need_to_sleep())</span>
<a name="190" /><span class="Maybe">     190:</span> <span class="k"> *        schedule();</span>
<a name="191" /><span class="Maybe">     191:</span> <span class="k"> *</span>
<a name="192" /><span class="Maybe">     192:</span> <span class="k"> * If the caller does not need such serialisation then use __set_current_state()</span>
<a name="193" /><span class="Maybe">     193:</span> <span class="k"> */</span>
<a name="194" /><span class="Maybe">     194:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X19zZXRfY3VycmVudF9zdGF0ZV8w"><span class="b">__set_current_state</span></a><span class="f">(</span><span class="b">state_value</span><span class="f">)</span>            \
<a name="195" /><span class="Maybe">     195:</span>     <span class="m">do</span> <span class="f">{</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">state</span> <span class="f">=</span> <span class="f">(</span><span class="b">state_value</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="196" /><span class="Maybe">     196:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2V0X2N1cnJlbnRfc3RhdGVfMA__"><span class="b">set_current_state</span></a><span class="f">(</span><span class="b">state_value</span><span class="f">)</span>        \
<a name="197" /><span class="Maybe">     197:</span>     <a href="cpu.c_macros_noref.html#_c2V0X21iXzA_"><span class="b">set_mb</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">state</span><span class="f">,</span> <span class="f">(</span><span class="b">state_value</span><span class="f">)</span><span class="f">)</span>
<a name="198" /><span class="Maybe">     198:</span> 
<a name="199" /><span class="Maybe">     199:</span> <span class="k">/* Task command name length */</span>
<a name="200" /><span class="Maybe">     200:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19DT01NX0xFTl8w"><span class="b">TASK_COMM_LEN</span></a> <span class="c">16</span>
<a name="201" /><span class="Maybe">     201:</span> 
<a name="202" /><span class="Maybe">     202:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">spinlock</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="203" /><span class="Maybe">     203:</span> 
<a name="204" /><span class="Maybe">     204:</span> <span class="k">/*</span>
<a name="205" /><span class="Maybe">     205:</span> <span class="k"> * This serializes &quot;schedule()&quot; and also protects</span>
<a name="206" /><span class="Maybe">     206:</span> <span class="k"> * the run-queue from deletions/modifications (but</span>
<a name="207" /><span class="Maybe">     207:</span> <span class="k"> * _adding_ to the beginning of the run-queue has</span>
<a name="208" /><span class="Maybe">     208:</span> <span class="k"> * a separate lock).</span>
<a name="209" /><span class="Maybe">     209:</span> <span class="k"> */</span>
<a name="210" /><span class="Maybe">     210:</span> <span class="m">extern</span> <span class="b">rwlock_t</span> <span class="b">tasklist_lock</span><span class="f">;</span>
<a name="211" /><span class="Maybe">     211:</span> <span class="m">extern</span> <span class="b">spinlock_t</span> <span class="b">mmlist_lock</span><span class="f">;</span>
<a name="212" /><span class="Maybe">     212:</span> 
<a name="213" /><span class="Maybe">     213:</span> <span class="m">struct</span> <span class="b">task_struct</span><span class="f">;</span>
<a name="214" /><span class="Maybe">     214:</span> 
<a name="215" /><span class="False">     215:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PROVE_RCU</span>
<a name="216" /><span class="False">     216:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lockdep_tasklist_lock_is_held</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="217" /><span class="Maybe">     217:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_PROVE_RCU */</span>
<a name="218" /><span class="Maybe">     218:</span> 
<a name="219" /><span class="Maybe">     219:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="220" /><span class="Maybe">     220:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_init_smp</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="221" /><span class="Maybe">     221:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <span class="m">void</span> <span class="b">schedule_tail</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">prev</span><span class="f">)</span><span class="f">;</span>
<a name="222" /><span class="Maybe">     222:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">init_idle</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">idle</span><span class="f">,</span> <span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="223" /><span class="Maybe">     223:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">init_idle_bootup_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">idle</span><span class="f">)</span><span class="f">;</span>
<a name="224" /><span class="Maybe">     224:</span> 
<a name="225" /><span class="Maybe">     225:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">runqueue_is_locked</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="226" /><span class="Maybe">     226:</span> 
<a name="227" /><span class="Maybe">     227:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX05PX0haX0NPTU1PTl8w"><span class="b">CONFIG_NO_HZ_COMMON</span></a><span class="f">)</span>
<a name="228" /><span class="Maybe">     228:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">nohz_balance_enter_idle</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="229" /><span class="Maybe">     229:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_cpu_sd_state_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="230" /><span class="Maybe">     230:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">get_nohz_timer_target</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="231" /><span class="False">     231:</span> <span class="f">#</span><span class="n">else</span>
<a name="232" /><span class="False">     232:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">nohz_balance_enter_idle</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="233" /><span class="False">     233:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_cpu_sd_state_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="234" /><span class="Maybe">     234:</span> <span class="f">#</span><span class="n">endif</span>
<a name="235" /><span class="Maybe">     235:</span> 
<a name="236" /><span class="Maybe">     236:</span> <span class="k">/*</span>
<a name="237" /><span class="Maybe">     237:</span> <span class="k"> * Only dump TASK_* tasks. (0 for all tasks)</span>
<a name="238" /><span class="Maybe">     238:</span> <span class="k"> */</span>
<a name="239" /><span class="Maybe">     239:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">show_state_filter</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">state_filter</span><span class="f">)</span><span class="f">;</span>
<a name="240" /><span class="Maybe">     240:</span> 
<a name="241" /><span class="Maybe">     241:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">show_state</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="242" /><span class="Maybe">     242:</span> <span class="f">{</span>
<a name="243" /><span class="Maybe">     243:</span>     <span class="b">show_state_filter</span><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="244" /><span class="Maybe">     244:</span> <span class="f">}</span>
<a name="245" /><span class="Maybe">     245:</span> 
<a name="246" /><span class="Maybe">     246:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">show_regs</span><span class="f">(</span><span class="m">struct</span> <span class="b">pt_regs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="247" /><span class="Maybe">     247:</span> 
<a name="248" /><span class="Maybe">     248:</span> <span class="k">/*</span>
<a name="249" /><span class="Maybe">     249:</span> <span class="k"> * TASK is a pointer to the task whose backtrace we want to see (or NULL for current</span>
<a name="250" /><span class="Maybe">     250:</span> <span class="k"> * task), SP is the stack pointer of the first frame that should be shown in the back</span>
<a name="251" /><span class="Maybe">     251:</span> <span class="k"> * trace (or NULL if the entire call-chain of the task should be shown).</span>
<a name="252" /><span class="Maybe">     252:</span> <span class="k"> */</span>
<a name="253" /><span class="Maybe">     253:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">show_stack</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">sp</span><span class="f">)</span><span class="f">;</span>
<a name="254" /><span class="Maybe">     254:</span> 
<a name="255" /><span class="Maybe">     255:</span> <span class="m">void</span> <span class="b">io_schedule</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="256" /><span class="Maybe">     256:</span> <span class="m">long</span> <span class="b">io_schedule_timeout</span><span class="f">(</span><span class="m">long</span> <span class="b">timeout</span><span class="f">)</span><span class="f">;</span>
<a name="257" /><span class="Maybe">     257:</span> 
<a name="258" /><span class="Maybe">     258:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">cpu_init</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="259" /><span class="Maybe">     259:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">trap_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="260" /><span class="Maybe">     260:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">update_process_times</span><span class="f">(</span><span class="m">int</span> <span class="b">user</span><span class="f">)</span><span class="f">;</span>
<a name="261" /><span class="Maybe">     261:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">scheduler_tick</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="262" /><span class="Maybe">     262:</span> 
<a name="263" /><span class="Maybe">     263:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_show_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="264" /><span class="Maybe">     264:</span> 
<a name="265" /><span class="False">     265:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCKUP_DETECTOR</span>
<a name="266" /><span class="False">     266:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">touch_softlockup_watchdog</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="267" /><span class="False">     267:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">touch_softlockup_watchdog_sync</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="268" /><span class="False">     268:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">touch_all_softlockup_watchdogs</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="269" /><span class="False">     269:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">proc_dowatchdog_thresh</span><span class="f">(</span><span class="m">struct</span> <span class="b">ctl_table</span> <span class="f">*</span><span class="b">table</span><span class="f">,</span> <span class="m">int</span> <span class="b">write</span><span class="f">,</span>
<a name="270" /><span class="False">     270:</span>                   <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buffer</span><span class="f">,</span>
<a name="271" /><span class="False">     271:</span>                   <span class="b">size_t</span> <span class="f">*</span><span class="b">lenp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="272" /><span class="False">     272:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">int</span>  <span class="b">softlockup_panic</span><span class="f">;</span>
<a name="273" /><span class="False">     273:</span> <span class="m">void</span> <span class="b">lockup_detector_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="274" /><span class="Maybe">     274:</span> <span class="f">#</span><span class="n">else</span>
<a name="275" /><span class="Maybe">     275:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">touch_softlockup_watchdog</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="276" /><span class="Maybe">     276:</span> <span class="f">{</span>
<a name="277" /><span class="Maybe">     277:</span> <span class="f">}</span>
<a name="278" /><span class="Maybe">     278:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">touch_softlockup_watchdog_sync</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="279" /><span class="Maybe">     279:</span> <span class="f">{</span>
<a name="280" /><span class="Maybe">     280:</span> <span class="f">}</span>
<a name="281" /><span class="Maybe">     281:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">touch_all_softlockup_watchdogs</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="282" /><span class="Maybe">     282:</span> <span class="f">{</span>
<a name="283" /><span class="Maybe">     283:</span> <span class="f">}</span>
<a name="284" /><span class="Maybe">     284:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lockup_detector_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="285" /><span class="Maybe">     285:</span> <span class="f">{</span>
<a name="286" /><span class="Maybe">     286:</span> <span class="f">}</span>
<a name="287" /><span class="Maybe">     287:</span> <span class="f">#</span><span class="n">endif</span>
<a name="288" /><span class="Maybe">     288:</span> 
<a name="289" /><span class="Maybe">     289:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0RFVEVDVF9IVU5HX1RBU0tfMA__"><span class="b">CONFIG_DETECT_HUNG_TASK</span></a>
<a name="290" /><span class="Maybe">     290:</span> <span class="m">void</span> <span class="b">reset_hung_task_detector</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="291" /><span class="False">     291:</span> <span class="f">#</span><span class="n">else</span>
<a name="292" /><span class="False">     292:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">reset_hung_task_detector</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="293" /><span class="False">     293:</span> <span class="f">{</span>
<a name="294" /><span class="False">     294:</span> <span class="f">}</span>
<a name="295" /><span class="Maybe">     295:</span> <span class="f">#</span><span class="n">endif</span>
<a name="296" /><span class="Maybe">     296:</span> 
<a name="297" /><span class="Maybe">     297:</span> <span class="k">/* Attach to any functions which should be ignored in wchan output. */</span>
<a name="298" /><span class="Maybe">     298:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19zY2hlZF8w"><span class="b">__sched</span></a>        <span class="b">__attribute__</span><span class="f">(</span><span class="f">(</span><span class="b">__section__</span><span class="f">(</span><span class="e">&quot;.sched.text&quot;</span><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="299" /><span class="Maybe">     299:</span> 
<a name="300" /><span class="Maybe">     300:</span> <span class="k">/* Linker adds these: start and end of __sched functions */</span>
<a name="301" /><span class="Maybe">     301:</span> <span class="m">extern</span> <span class="m">char</span> <span class="b">__sched_text_start</span><span class="f">[</span><span class="f">]</span><span class="f">,</span> <span class="b">__sched_text_end</span><span class="f">[</span><span class="f">]</span><span class="f">;</span>
<a name="302" /><span class="Maybe">     302:</span> 
<a name="303" /><span class="Maybe">     303:</span> <span class="k">/* Is this address in the __sched functions? */</span>
<a name="304" /><span class="Maybe">     304:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">in_sched_functions</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">)</span><span class="f">;</span>
<a name="305" /><span class="Maybe">     305:</span> 
<a name="306" /><span class="Maybe">     306:</span> <span class="f">#</span><span class="n">define</span>    <a href="cpu.c_macros_noref.html#_TUFYX1NDSEVEVUxFX1RJTUVPVVRfMA__"><span class="b">MAX_SCHEDULE_TIMEOUT</span></a>    <a href="cpu.c_macros_noref.html#_TE9OR19NQVhfMA__"><span class="b">LONG_MAX</span></a>
<a name="307" /><span class="Maybe">     307:</span> <span class="m">extern</span> <span class="m">signed</span> <span class="m">long</span> <span class="b">schedule_timeout</span><span class="f">(</span><span class="m">signed</span> <span class="m">long</span> <span class="b">timeout</span><span class="f">)</span><span class="f">;</span>
<a name="308" /><span class="Maybe">     308:</span> <span class="m">extern</span> <span class="m">signed</span> <span class="m">long</span> <span class="b">schedule_timeout_interruptible</span><span class="f">(</span><span class="m">signed</span> <span class="m">long</span> <span class="b">timeout</span><span class="f">)</span><span class="f">;</span>
<a name="309" /><span class="Maybe">     309:</span> <span class="m">extern</span> <span class="m">signed</span> <span class="m">long</span> <span class="b">schedule_timeout_killable</span><span class="f">(</span><span class="m">signed</span> <span class="m">long</span> <span class="b">timeout</span><span class="f">)</span><span class="f">;</span>
<a name="310" /><span class="Maybe">     310:</span> <span class="m">extern</span> <span class="m">signed</span> <span class="m">long</span> <span class="b">schedule_timeout_uninterruptible</span><span class="f">(</span><span class="m">signed</span> <span class="m">long</span> <span class="b">timeout</span><span class="f">)</span><span class="f">;</span>
<a name="311" /><span class="Maybe">     311:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <span class="m">void</span> <span class="b">schedule</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="312" /><span class="Maybe">     312:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">schedule_preempt_disabled</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="313" /><span class="Maybe">     313:</span> 
<a name="314" /><span class="Maybe">     314:</span> <span class="m">struct</span> <span class="b">nsproxy</span><span class="f">;</span>
<a name="315" /><span class="Maybe">     315:</span> <span class="m">struct</span> <span class="b">user_namespace</span><span class="f">;</span>
<a name="316" /><span class="Maybe">     316:</span> 
<a name="317" /><span class="Maybe">     317:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX01NVV8w"><span class="b">CONFIG_MMU</span></a>
<a name="318" /><span class="Maybe">     318:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">arch_pick_mmap_layout</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="319" /><span class="Maybe">     319:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span>
<a name="320" /><span class="Maybe">     320:</span> <span class="b">arch_get_unmapped_area</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span>
<a name="321" /><span class="Maybe">     321:</span>                <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="322" /><span class="Maybe">     322:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span>
<a name="323" /><span class="Maybe">     323:</span> <span class="b">arch_get_unmapped_area_topdown</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="324" /><span class="Maybe">     324:</span>               <span class="m">unsigned</span> <span class="m">long</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">pgoff</span><span class="f">,</span>
<a name="325" /><span class="Maybe">     325:</span>               <span class="m">unsigned</span> <span class="m">long</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="326" /><span class="False">     326:</span> <span class="f">#</span><span class="n">else</span>
<a name="327" /><span class="False">     327:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">arch_pick_mmap_layout</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="328" /><span class="Maybe">     328:</span> <span class="f">#</span><span class="n">endif</span>
<a name="329" /><span class="Maybe">     329:</span> 
<a name="330" /><span class="Maybe">     330:</span> 
<a name="331" /><span class="Maybe">     331:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_dumpable</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">int</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="332" /><span class="Maybe">     332:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">get_dumpable</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="333" /><span class="Maybe">     333:</span> 
<a name="334" /><span class="Maybe">     334:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U1VJRF9EVU1QX0RJU0FCTEVfMA__"><span class="b">SUID_DUMP_DISABLE</span></a>    <span class="c">0</span>    <span class="k">/* No setuid dumping */</span>
<a name="335" /><span class="Maybe">     335:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U1VJRF9EVU1QX1VTRVJfMA__"><span class="b">SUID_DUMP_USER</span></a>        <span class="c">1</span>    <span class="k">/* Dump as user of process */</span>
<a name="336" /><span class="Maybe">     336:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U1VJRF9EVU1QX1JPT1RfMA__"><span class="b">SUID_DUMP_ROOT</span></a>        <span class="c">2</span>    <span class="k">/* Dump as root */</span>
<a name="337" /><span class="Maybe">     337:</span> 
<a name="338" /><span class="Maybe">     338:</span> <span class="k">/* mm flags */</span>
<a name="339" /><span class="Maybe">     339:</span> <span class="k">/* dumpable bits */</span>
<a name="340" /><span class="Maybe">     340:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFXzA_"><span class="b">MMF_DUMPABLE</span></a>      <span class="c">0</span>  <span class="k">/* core dump is permitted */</span>
<a name="341" /><span class="Maybe">     341:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfU0VDVVJFTFlfMA__"><span class="b">MMF_DUMP_SECURELY</span></a> <span class="c">1</span>  <span class="k">/* core file is readable only by root */</span>
<a name="342" /><span class="Maybe">     342:</span> 
<a name="343" /><span class="Maybe">     343:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFX0JJVFNfMA__"><span class="b">MMF_DUMPABLE_BITS</span></a> <span class="c">2</span>
<a name="344" /><span class="Maybe">     344:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFX01BU0tfMA__"><span class="b">MMF_DUMPABLE_MASK</span></a> <span class="f">(</span><span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFX0JJVFNfMA__"><span class="b">MMF_DUMPABLE_BITS</span></a><span class="f">)</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span>
<a name="345" /><span class="Maybe">     345:</span> 
<a name="346" /><span class="Maybe">     346:</span> <span class="k">/* coredump filter bits */</span>
<a name="347" /><span class="Maybe">     347:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfQU5PTl9QUklWQVRFXzA_"><span class="b">MMF_DUMP_ANON_PRIVATE</span></a>    <span class="c">2</span>
<a name="348" /><span class="Maybe">     348:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfQU5PTl9TSEFSRURfMA__"><span class="b">MMF_DUMP_ANON_SHARED</span></a>    <span class="c">3</span>
<a name="349" /><span class="Maybe">     349:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfTUFQUEVEX1BSSVZBVEVfMA__"><span class="b">MMF_DUMP_MAPPED_PRIVATE</span></a>    <span class="c">4</span>
<a name="350" /><span class="Maybe">     350:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfTUFQUEVEX1NIQVJFRF8w"><span class="b">MMF_DUMP_MAPPED_SHARED</span></a>    <span class="c">5</span>
<a name="351" /><span class="Maybe">     351:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRUxGX0hFQURFUlNfMA__"><span class="b">MMF_DUMP_ELF_HEADERS</span></a>    <span class="c">6</span>
<a name="352" /><span class="Maybe">     352:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfSFVHRVRMQl9QUklWQVRFXzA_"><span class="b">MMF_DUMP_HUGETLB_PRIVATE</span></a> <span class="c">7</span>
<a name="353" /><span class="Maybe">     353:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfSFVHRVRMQl9TSEFSRURfMA__"><span class="b">MMF_DUMP_HUGETLB_SHARED</span></a>  <span class="c">8</span>
<a name="354" /><span class="Maybe">     354:</span> 
<a name="355" /><span class="Maybe">     355:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX1NISUZUXzA_"><span class="b">MMF_DUMP_FILTER_SHIFT</span></a>    <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFX0JJVFNfMA__"><span class="b">MMF_DUMPABLE_BITS</span></a>
<a name="356" /><span class="Maybe">     356:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX0JJVFNfMA__"><span class="b">MMF_DUMP_FILTER_BITS</span></a>    <span class="c">7</span>
<a name="357" /><span class="Maybe">     357:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX01BU0tfMA__"><span class="b">MMF_DUMP_FILTER_MASK</span></a> \
<a name="358" /><span class="Maybe">     358:</span>     <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX0JJVFNfMA__"><span class="b">MMF_DUMP_FILTER_BITS</span></a><span class="f">)</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX1NISUZUXzA_"><span class="b">MMF_DUMP_FILTER_SHIFT</span></a><span class="f">)</span>
<a name="359" /><span class="Maybe">     359:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX0RFRkFVTFRfMA__"><span class="b">MMF_DUMP_FILTER_DEFAULT</span></a> \
<a name="360" /><span class="Maybe">     360:</span>     <span class="f">(</span><span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfQU5PTl9QUklWQVRFXzA_"><span class="b">MMF_DUMP_ANON_PRIVATE</span></a><span class="f">)</span> <span class="f">|</span>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfQU5PTl9TSEFSRURfMA__"><span class="b">MMF_DUMP_ANON_SHARED</span></a><span class="f">)</span> <span class="f">|\
</span>     <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfSFVHRVRMQl9QUklWQVRFXzA_"><span class="b">MMF_DUMP_HUGETLB_PRIVATE</span></a><span class="f">)</span> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfTUFTS19ERUZBVUxUX0VMRl8w"><span class="b">MMF_DUMP_MASK_DEFAULT_ELF</span></a><span class="f">)</span>
<a name="362" /><span class="Maybe">     362:</span> 
<a name="363" /><span class="Maybe">     363:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NPUkVfRFVNUF9ERUZBVUxUX0VMRl9IRUFERVJTXzA_"><span class="b">CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS</span></a>
<a name="364" /><span class="Maybe">     364:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfTUFTS19ERUZBVUxUX0VMRl8w"><span class="b">MMF_DUMP_MASK_DEFAULT_ELF</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRUxGX0hFQURFUlNfMA__"><span class="b">MMF_DUMP_ELF_HEADERS</span></a><span class="f">)</span>
<a name="365" /><span class="False">     365:</span> <span class="f">#</span><span class="n">else</span>
<a name="366" /><span class="False">     366:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfTUFTS19ERUZBVUxUX0VMRl8w"><span class="b">MMF_DUMP_MASK_DEFAULT_ELF</span></a>    <span class="c">0</span>
<a name="367" /><span class="Maybe">     367:</span> <span class="f">#</span><span class="n">endif</span>
<a name="368" /><span class="Maybe">     368:</span>                     <span class="k">/* leave room for more dump flags */</span>
<a name="369" /><span class="Maybe">     369:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX1ZNX01FUkdFQUJMRV8w"><span class="b">MMF_VM_MERGEABLE</span></a>    <span class="c">16</span>    <span class="k">/* KSM may merge identical pages */</span>
<a name="370" /><span class="Maybe">     370:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX1ZNX0hVR0VQQUdFXzA_"><span class="b">MMF_VM_HUGEPAGE</span></a>        <span class="c">17</span>    <span class="k">/* set when VM_HUGEPAGE is set on vma */</span>
<a name="371" /><span class="Maybe">     371:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0VYRV9GSUxFX0NIQU5HRURfMA__"><span class="b">MMF_EXE_FILE_CHANGED</span></a>    <span class="c">18</span>    <span class="k">/* see prctl_set_mm_exe_file() */</span>
<a name="372" /><span class="Maybe">     372:</span> 
<a name="373" /><span class="Maybe">     373:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0hBU19VUFJPQkVTXzA_"><span class="b">MMF_HAS_UPROBES</span></a>        <span class="c">19</span>    <span class="k">/* has uprobes */</span>
<a name="374" /><span class="Maybe">     374:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX1JFQ0FMQ19VUFJPQkVTXzA_"><span class="b">MMF_RECALC_UPROBES</span></a>    <span class="c">20</span>    <span class="k">/* MMF_HAS_UPROBES can be wrong */</span>
<a name="375" /><span class="Maybe">     375:</span> 
<a name="376" /><span class="Maybe">     376:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU1GX0lOSVRfTUFTS18w"><span class="b">MMF_INIT_MASK</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_TU1GX0RVTVBBQkxFX01BU0tfMA__"><span class="b">MMF_DUMPABLE_MASK</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_TU1GX0RVTVBfRklMVEVSX01BU0tfMA__"><span class="b">MMF_DUMP_FILTER_MASK</span></a><span class="f">)</span>
<a name="377" /><span class="Maybe">     377:</span> 
<a name="378" /><span class="Maybe">     378:</span> <span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">{</span>
<a name="379" /><span class="Maybe">     379:</span>     <span class="b">atomic_t</span>        <span class="b">count</span><span class="f">;</span>
<a name="380" /><span class="Maybe">     380:</span>     <span class="m">struct</span> <span class="b">k_sigaction</span>    <span class="b">action</span><span class="f">[</span><span class="b">_NSIG</span><span class="f">]</span><span class="f">;</span>
<a name="381" /><span class="Maybe">     381:</span>     <span class="b">spinlock_t</span>        <span class="b">siglock</span><span class="f">;</span>
<a name="382" /><span class="Maybe">     382:</span>     <span class="b">wait_queue_head_t</span>    <span class="b">signalfd_wqh</span><span class="f">;</span>
<a name="383" /><span class="Maybe">     383:</span> <span class="f">}</span><span class="f">;</span>
<a name="384" /><span class="Maybe">     384:</span> 
<a name="385" /><span class="Maybe">     385:</span> <span class="m">struct</span> <span class="b">pacct_struct</span> <span class="f">{</span>
<a name="386" /><span class="Maybe">     386:</span>     <span class="m">int</span>            <span class="b">ac_flag</span><span class="f">;</span>
<a name="387" /><span class="Maybe">     387:</span>     <span class="m">long</span>            <span class="b">ac_exitcode</span><span class="f">;</span>
<a name="388" /><span class="Maybe">     388:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">ac_mem</span><span class="f">;</span>
<a name="389" /><span class="Maybe">     389:</span>     <span class="b">cputime_t</span>        <span class="b">ac_utime</span><span class="f">,</span> <span class="b">ac_stime</span><span class="f">;</span>
<a name="390" /><span class="Maybe">     390:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">ac_minflt</span><span class="f">,</span> <span class="b">ac_majflt</span><span class="f">;</span>
<a name="391" /><span class="Maybe">     391:</span> <span class="f">}</span><span class="f">;</span>
<a name="392" /><span class="Maybe">     392:</span> 
<a name="393" /><span class="Maybe">     393:</span> <span class="m">struct</span> <span class="b">cpu_itimer</span> <span class="f">{</span>
<a name="394" /><span class="Maybe">     394:</span>     <span class="b">cputime_t</span> <span class="b">expires</span><span class="f">;</span>
<a name="395" /><span class="Maybe">     395:</span>     <span class="b">cputime_t</span> <span class="b">incr</span><span class="f">;</span>
<a name="396" /><span class="Maybe">     396:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">error</span><span class="f">;</span>
<a name="397" /><span class="Maybe">     397:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">incr_error</span><span class="f">;</span>
<a name="398" /><span class="Maybe">     398:</span> <span class="f">}</span><span class="f">;</span>
<a name="399" /><span class="Maybe">     399:</span> 
<a name="400" /><span class="Maybe">     400:</span> <span class="k">/**</span>
<a name="401" /><span class="Maybe">     401:</span> <span class="k"> * struct cputime - snaphsot of system and user cputime</span>
<a name="402" /><span class="Maybe">     402:</span> <span class="k"> * @utime: time spent in user mode</span>
<a name="403" /><span class="Maybe">     403:</span> <span class="k"> * @stime: time spent in system mode</span>
<a name="404" /><span class="Maybe">     404:</span> <span class="k"> *</span>
<a name="405" /><span class="Maybe">     405:</span> <span class="k"> * Gathers a generic snapshot of user and system time.</span>
<a name="406" /><span class="Maybe">     406:</span> <span class="k"> */</span>
<a name="407" /><span class="Maybe">     407:</span> <span class="m">struct</span> <span class="b">cputime</span> <span class="f">{</span>
<a name="408" /><span class="Maybe">     408:</span>     <span class="b">cputime_t</span> <span class="b">utime</span><span class="f">;</span>
<a name="409" /><span class="Maybe">     409:</span>     <span class="b">cputime_t</span> <span class="b">stime</span><span class="f">;</span>
<a name="410" /><span class="Maybe">     410:</span> <span class="f">}</span><span class="f">;</span>
<a name="411" /><span class="Maybe">     411:</span> 
<a name="412" /><span class="Maybe">     412:</span> <span class="k">/**</span>
<a name="413" /><span class="Maybe">     413:</span> <span class="k"> * struct task_cputime - collected CPU time counts</span>
<a name="414" /><span class="Maybe">     414:</span> <span class="k"> * @utime:        time spent in user mode, in &amp;cputime_t units</span>
<a name="415" /><span class="Maybe">     415:</span> <span class="k"> * @stime:        time spent in kernel mode, in &amp;cputime_t units</span>
<a name="416" /><span class="Maybe">     416:</span> <span class="k"> * @sum_exec_runtime:    total time spent on the CPU, in nanoseconds</span>
<a name="417" /><span class="Maybe">     417:</span> <span class="k"> *</span>
<a name="418" /><span class="Maybe">     418:</span> <span class="k"> * This is an extension of struct cputime that includes the total runtime</span>
<a name="419" /><span class="Maybe">     419:</span> <span class="k"> * spent by the task from the scheduler point of view.</span>
<a name="420" /><span class="Maybe">     420:</span> <span class="k"> *</span>
<a name="421" /><span class="Maybe">     421:</span> <span class="k"> * As a result, this structure groups together three kinds of CPU time</span>
<a name="422" /><span class="Maybe">     422:</span> <span class="k"> * that are tracked for threads and thread groups.  Most things considering</span>
<a name="423" /><span class="Maybe">     423:</span> <span class="k"> * CPU time want to group these counts together and treat all three</span>
<a name="424" /><span class="Maybe">     424:</span> <span class="k"> * of them in parallel.</span>
<a name="425" /><span class="Maybe">     425:</span> <span class="k"> */</span>
<a name="426" /><span class="Maybe">     426:</span> <span class="m">struct</span> <span class="b">task_cputime</span> <span class="f">{</span>
<a name="427" /><span class="Maybe">     427:</span>     <span class="b">cputime_t</span> <span class="b">utime</span><span class="f">;</span>
<a name="428" /><span class="Maybe">     428:</span>     <span class="b">cputime_t</span> <span class="b">stime</span><span class="f">;</span>
<a name="429" /><span class="Maybe">     429:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">sum_exec_runtime</span><span class="f">;</span>
<a name="430" /><span class="Maybe">     430:</span> <span class="f">}</span><span class="f">;</span>
<a name="431" /><span class="Maybe">     431:</span> <span class="k">/* Alternate field names when used to cache expirations. */</span>
<a name="432" /><span class="Maybe">     432:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJvZl9leHBfMA__"><span class="b">prof_exp</span></a>    <span class="b">stime</span>
<a name="433" /><span class="Maybe">     433:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dmlydF9leHBfMA__"><span class="b">virt_exp</span></a>    <span class="b">utime</span>
<a name="434" /><span class="Maybe">     434:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2NoZWRfZXhwXzA_"><span class="b">sched_exp</span></a>    <span class="b">sum_exec_runtime</span>
<a name="435" /><span class="Maybe">     435:</span> 
<a name="436" /><span class="Maybe">     436:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9DUFVUSU1FXzA_"><span class="b">INIT_CPUTIME</span></a>    \
<a name="437" /><span class="Maybe">     437:</span>     <span class="f">(</span><span class="m">struct</span> <span class="b">task_cputime</span><span class="f">)</span> <span class="f">{</span>                    \
<a name="438" /><span class="Maybe">     438:</span>         <span class="f">.</span><span class="b">utime</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>                    \
<a name="439" /><span class="Maybe">     439:</span>         <span class="f">.</span><span class="b">stime</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>                    \
<a name="440" /><span class="Maybe">     440:</span>         <span class="f">.</span><span class="b">sum_exec_runtime</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>                \
<a name="441" /><span class="Maybe">     441:</span>     <span class="f">}</span>
<a name="442" /><span class="Maybe">     442:</span> 
<a name="443" /><span class="False">     443:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PREEMPT_COUNT</span>
<a name="444" /><span class="False">     444:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9ESVNBQkxFRF8w"><span class="b">PREEMPT_DISABLED</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">+</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9FTkFCTEVEXzA_"><span class="b">PREEMPT_ENABLED</span></a><span class="f">)</span>
<a name="445" /><span class="Maybe">     445:</span> <span class="f">#</span><span class="n">else</span>
<a name="446" /><span class="Maybe">     446:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9ESVNBQkxFRF8w"><span class="b">PREEMPT_DISABLED</span></a>    <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9FTkFCTEVEXzA_"><span class="b">PREEMPT_ENABLED</span></a>
<a name="447" /><span class="Maybe">     447:</span> <span class="f">#</span><span class="n">endif</span>
<a name="448" /><span class="Maybe">     448:</span> 
<a name="449" /><span class="Maybe">     449:</span> <span class="k">/*</span>
<a name="450" /><span class="Maybe">     450:</span> <span class="k"> * Disable preemption until the scheduler is running.</span>
<a name="451" /><span class="Maybe">     451:</span> <span class="k"> * Reset by start_kernel()-&gt;sched_init()-&gt;init_idle().</span>
<a name="452" /><span class="Maybe">     452:</span> <span class="k"> *</span>
<a name="453" /><span class="Maybe">     453:</span> <span class="k"> * We include PREEMPT_ACTIVE to avoid cond_resched() from working</span>
<a name="454" /><span class="Maybe">     454:</span> <span class="k"> * before the scheduler is active -- see should_resched().</span>
<a name="455" /><span class="Maybe">     455:</span> <span class="k"> */</span>
<a name="456" /><span class="Maybe">     456:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9QUkVFTVBUX0NPVU5UXzA_"><span class="b">INIT_PREEMPT_COUNT</span></a>    <span class="f">(</span><a href="cpu.c_macros_noref.html#_UFJFRU1QVF9ESVNBQkxFRF8w"><span class="b">PREEMPT_DISABLED</span></a> <span class="f">+</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9BQ1RJVkVfMA__"><span class="b">PREEMPT_ACTIVE</span></a><span class="f">)</span>
<a name="457" /><span class="Maybe">     457:</span> 
<a name="458" /><span class="Maybe">     458:</span> <span class="k">/**</span>
<a name="459" /><span class="Maybe">     459:</span> <span class="k"> * struct thread_group_cputimer - thread group interval timer counts</span>
<a name="460" /><span class="Maybe">     460:</span> <span class="k"> * @cputime:        thread group interval timers.</span>
<a name="461" /><span class="Maybe">     461:</span> <span class="k"> * @running:        non-zero when there are timers running and</span>
<a name="462" /><span class="Maybe">     462:</span> <span class="k"> *             @cputime receives updates.</span>
<a name="463" /><span class="Maybe">     463:</span> <span class="k"> * @lock:        lock for fields in this struct.</span>
<a name="464" /><span class="Maybe">     464:</span> <span class="k"> *</span>
<a name="465" /><span class="Maybe">     465:</span> <span class="k"> * This structure contains the version of task_cputime, above, that is</span>
<a name="466" /><span class="Maybe">     466:</span> <span class="k"> * used for thread group CPU timer calculations.</span>
<a name="467" /><span class="Maybe">     467:</span> <span class="k"> */</span>
<a name="468" /><span class="Maybe">     468:</span> <span class="m">struct</span> <span class="b">thread_group_cputimer</span> <span class="f">{</span>
<a name="469" /><span class="Maybe">     469:</span>     <span class="m">struct</span> <span class="b">task_cputime</span> <span class="b">cputime</span><span class="f">;</span>
<a name="470" /><span class="Maybe">     470:</span>     <span class="m">int</span> <span class="b">running</span><span class="f">;</span>
<a name="471" /><span class="Maybe">     471:</span>     <span class="b">raw_spinlock_t</span> <span class="b">lock</span><span class="f">;</span>
<a name="472" /><span class="Maybe">     472:</span> <span class="f">}</span><span class="f">;</span>
<a name="473" /><span class="Maybe">     473:</span> 
<a name="474" /><span class="Maybe">     474:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rwsem</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="475" /><span class="Maybe">     475:</span> <span class="m">struct</span> <span class="b">autogroup</span><span class="f">;</span>
<a name="476" /><span class="Maybe">     476:</span> 
<a name="477" /><span class="Maybe">     477:</span> <span class="k">/*</span>
<a name="478" /><span class="Maybe">     478:</span> <span class="k"> * NOTE! &quot;signal_struct&quot; does not have its own</span>
<a name="479" /><span class="Maybe">     479:</span> <span class="k"> * locking, because a shared signal_struct always</span>
<a name="480" /><span class="Maybe">     480:</span> <span class="k"> * implies a shared sighand_struct, so locking</span>
<a name="481" /><span class="Maybe">     481:</span> <span class="k"> * sighand_struct is always a proper superset of</span>
<a name="482" /><span class="Maybe">     482:</span> <span class="k"> * the locking of signal_struct.</span>
<a name="483" /><span class="Maybe">     483:</span> <span class="k"> */</span>
<a name="484" /><span class="Maybe">     484:</span> <span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">{</span>
<a name="485" /><span class="Maybe">     485:</span>     <span class="b">atomic_t</span>        <span class="b">sigcnt</span><span class="f">;</span>
<a name="486" /><span class="Maybe">     486:</span>     <span class="b">atomic_t</span>        <span class="b">live</span><span class="f">;</span>
<a name="487" /><span class="Maybe">     487:</span>     <span class="m">int</span>            <span class="b">nr_threads</span><span class="f">;</span>
<a name="488" /><span class="Maybe">     488:</span> 
<a name="489" /><span class="Maybe">     489:</span>     <span class="b">wait_queue_head_t</span>    <span class="b">wait_chldexit</span><span class="f">;</span>    <span class="k">/* for wait4() */</span>
<a name="490" /><span class="Maybe">     490:</span> 
<a name="491" /><span class="Maybe">     491:</span>     <span class="k">/* current thread group signal load-balancing target: */</span>
<a name="492" /><span class="Maybe">     492:</span>     <span class="m">struct</span> <span class="b">task_struct</span>    <span class="f">*</span><span class="b">curr_target</span><span class="f">;</span>
<a name="493" /><span class="Maybe">     493:</span> 
<a name="494" /><span class="Maybe">     494:</span>     <span class="k">/* shared signal handling: */</span>
<a name="495" /><span class="Maybe">     495:</span>     <span class="m">struct</span> <span class="b">sigpending</span>    <span class="b">shared_pending</span><span class="f">;</span>
<a name="496" /><span class="Maybe">     496:</span> 
<a name="497" /><span class="Maybe">     497:</span>     <span class="k">/* thread group exit support */</span>
<a name="498" /><span class="Maybe">     498:</span>     <span class="m">int</span>            <span class="b">group_exit_code</span><span class="f">;</span>
<a name="499" /><span class="Maybe">     499:</span>     <span class="k">/* overloaded:</span>
<a name="500" /><span class="Maybe">     500:</span> <span class="k">     * - notify group_exit_task when -&gt;count is equal to notify_count</span>
<a name="501" /><span class="Maybe">     501:</span> <span class="k">     * - everyone except group_exit_task is stopped during signal delivery</span>
<a name="502" /><span class="Maybe">     502:</span> <span class="k">     *   of fatal signals, group_exit_task processes the signal.</span>
<a name="503" /><span class="Maybe">     503:</span> <span class="k">     */</span>
<a name="504" /><span class="Maybe">     504:</span>     <span class="m">int</span>            <span class="b">notify_count</span><span class="f">;</span>
<a name="505" /><span class="Maybe">     505:</span>     <span class="m">struct</span> <span class="b">task_struct</span>    <span class="f">*</span><span class="b">group_exit_task</span><span class="f">;</span>
<a name="506" /><span class="Maybe">     506:</span> 
<a name="507" /><span class="Maybe">     507:</span>     <span class="k">/* thread group stop support, overloads group_exit_code too */</span>
<a name="508" /><span class="Maybe">     508:</span>     <span class="m">int</span>            <span class="b">group_stop_count</span><span class="f">;</span>
<a name="509" /><span class="Maybe">     509:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">flags</span><span class="f">;</span> <span class="k">/* see SIGNAL_* flags below */</span>
<a name="510" /><span class="Maybe">     510:</span> 
<a name="511" /><span class="Maybe">     511:</span>     <span class="k">/*</span>
<a name="512" /><span class="Maybe">     512:</span> <span class="k">     * PR_SET_CHILD_SUBREAPER marks a process, like a service</span>
<a name="513" /><span class="Maybe">     513:</span> <span class="k">     * manager, to re-parent orphan (double-forking) child processes</span>
<a name="514" /><span class="Maybe">     514:</span> <span class="k">     * to this process instead of &apos;init&apos;. The service manager is</span>
<a name="515" /><span class="Maybe">     515:</span> <span class="k">     * able to receive SIGCHLD signals and is able to investigate</span>
<a name="516" /><span class="Maybe">     516:</span> <span class="k">     * the process until it calls wait(). All children of this</span>
<a name="517" /><span class="Maybe">     517:</span> <span class="k">     * process will inherit a flag if they should look for a</span>
<a name="518" /><span class="Maybe">     518:</span> <span class="k">     * child_subreaper process at exit.</span>
<a name="519" /><span class="Maybe">     519:</span> <span class="k">     */</span>
<a name="520" /><span class="Maybe">     520:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">is_child_subreaper</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="521" /><span class="Maybe">     521:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">has_child_subreaper</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="522" /><span class="Maybe">     522:</span> 
<a name="523" /><span class="Maybe">     523:</span>     <span class="k">/* POSIX.1b Interval Timers */</span>
<a name="524" /><span class="Maybe">     524:</span>     <span class="m">int</span>            <span class="b">posix_timer_id</span><span class="f">;</span>
<a name="525" /><span class="Maybe">     525:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">posix_timers</span><span class="f">;</span>
<a name="526" /><span class="Maybe">     526:</span> 
<a name="527" /><span class="Maybe">     527:</span>     <span class="k">/* ITIMER_REAL timer for the process */</span>
<a name="528" /><span class="Maybe">     528:</span>     <span class="m">struct</span> <span class="b">hrtimer</span> <span class="b">real_timer</span><span class="f">;</span>
<a name="529" /><span class="Maybe">     529:</span>     <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">leader_pid</span><span class="f">;</span>
<a name="530" /><span class="Maybe">     530:</span>     <span class="b">ktime_t</span> <span class="b">it_real_incr</span><span class="f">;</span>
<a name="531" /><span class="Maybe">     531:</span> 
<a name="532" /><span class="Maybe">     532:</span>     <span class="k">/*</span>
<a name="533" /><span class="Maybe">     533:</span> <span class="k">     * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use</span>
<a name="534" /><span class="Maybe">     534:</span> <span class="k">     * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these</span>
<a name="535" /><span class="Maybe">     535:</span> <span class="k">     * values are defined to 0 and 1 respectively</span>
<a name="536" /><span class="Maybe">     536:</span> <span class="k">     */</span>
<a name="537" /><span class="Maybe">     537:</span>     <span class="m">struct</span> <span class="b">cpu_itimer</span> <span class="b">it</span><span class="f">[</span><span class="c">2</span><span class="f">]</span><span class="f">;</span>
<a name="538" /><span class="Maybe">     538:</span> 
<a name="539" /><span class="Maybe">     539:</span>     <span class="k">/*</span>
<a name="540" /><span class="Maybe">     540:</span> <span class="k">     * Thread group totals for process CPU timers.</span>
<a name="541" /><span class="Maybe">     541:</span> <span class="k">     * See thread_group_cputimer(), et al, for details.</span>
<a name="542" /><span class="Maybe">     542:</span> <span class="k">     */</span>
<a name="543" /><span class="Maybe">     543:</span>     <span class="m">struct</span> <span class="b">thread_group_cputimer</span> <span class="b">cputimer</span><span class="f">;</span>
<a name="544" /><span class="Maybe">     544:</span> 
<a name="545" /><span class="Maybe">     545:</span>     <span class="k">/* Earliest-expiration cache. */</span>
<a name="546" /><span class="Maybe">     546:</span>     <span class="m">struct</span> <span class="b">task_cputime</span> <span class="b">cputime_expires</span><span class="f">;</span>
<a name="547" /><span class="Maybe">     547:</span> 
<a name="548" /><span class="Maybe">     548:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">cpu_timers</span><span class="f">[</span><span class="c">3</span><span class="f">]</span><span class="f">;</span>
<a name="549" /><span class="Maybe">     549:</span> 
<a name="550" /><span class="Maybe">     550:</span>     <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">tty_old_pgrp</span><span class="f">;</span>
<a name="551" /><span class="Maybe">     551:</span> 
<a name="552" /><span class="Maybe">     552:</span>     <span class="k">/* boolean value for session group leader */</span>
<a name="553" /><span class="Maybe">     553:</span>     <span class="m">int</span> <span class="b">leader</span><span class="f">;</span>
<a name="554" /><span class="Maybe">     554:</span> 
<a name="555" /><span class="Maybe">     555:</span>     <span class="m">struct</span> <span class="b">tty_struct</span> <span class="f">*</span><span class="b">tty</span><span class="f">;</span> <span class="k">/* NULL if no tty */</span>
<a name="556" /><span class="Maybe">     556:</span> 
<a name="557" /><span class="False">     557:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_SCHED_AUTOGROUP</span>
<a name="558" /><span class="False">     558:</span>     <span class="m">struct</span> <span class="b">autogroup</span> <span class="f">*</span><span class="b">autogroup</span><span class="f">;</span>
<a name="559" /><span class="Maybe">     559:</span> <span class="f">#</span><span class="n">endif</span>
<a name="560" /><span class="Maybe">     560:</span>     <span class="k">/*</span>
<a name="561" /><span class="Maybe">     561:</span> <span class="k">     * Cumulative resource counters for dead threads in the group,</span>
<a name="562" /><span class="Maybe">     562:</span> <span class="k">     * and for reaped dead child processes forked by this group.</span>
<a name="563" /><span class="Maybe">     563:</span> <span class="k">     * Live threads maintain their own counters and add to these</span>
<a name="564" /><span class="Maybe">     564:</span> <span class="k">     * in __exit_signal, except for the group leader.</span>
<a name="565" /><span class="Maybe">     565:</span> <span class="k">     */</span>
<a name="566" /><span class="Maybe">     566:</span>     <span class="b">cputime_t</span> <span class="b">utime</span><span class="f">,</span> <span class="b">stime</span><span class="f">,</span> <span class="b">cutime</span><span class="f">,</span> <span class="b">cstime</span><span class="f">;</span>
<a name="567" /><span class="Maybe">     567:</span>     <span class="b">cputime_t</span> <span class="b">gtime</span><span class="f">;</span>
<a name="568" /><span class="Maybe">     568:</span>     <span class="b">cputime_t</span> <span class="b">cgtime</span><span class="f">;</span>
<a name="569" /><span class="Maybe">     569:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">CONFIG_VIRT_CPU_ACCOUNTING_NATIVE</span>
<a name="570" /><span class="Maybe">     570:</span>     <span class="m">struct</span> <span class="b">cputime</span> <span class="b">prev_cputime</span><span class="f">;</span>
<a name="571" /><span class="Maybe">     571:</span> <span class="f">#</span><span class="n">endif</span>
<a name="572" /><span class="Maybe">     572:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nvcsw</span><span class="f">,</span> <span class="b">nivcsw</span><span class="f">,</span> <span class="b">cnvcsw</span><span class="f">,</span> <span class="b">cnivcsw</span><span class="f">;</span>
<a name="573" /><span class="Maybe">     573:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">min_flt</span><span class="f">,</span> <span class="b">maj_flt</span><span class="f">,</span> <span class="b">cmin_flt</span><span class="f">,</span> <span class="b">cmaj_flt</span><span class="f">;</span>
<a name="574" /><span class="Maybe">     574:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">inblock</span><span class="f">,</span> <span class="b">oublock</span><span class="f">,</span> <span class="b">cinblock</span><span class="f">,</span> <span class="b">coublock</span><span class="f">;</span>
<a name="575" /><span class="Maybe">     575:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">maxrss</span><span class="f">,</span> <span class="b">cmaxrss</span><span class="f">;</span>
<a name="576" /><span class="Maybe">     576:</span>     <span class="m">struct</span> <span class="b">task_io_accounting</span> <span class="b">ioac</span><span class="f">;</span>
<a name="577" /><span class="Maybe">     577:</span> 
<a name="578" /><span class="Maybe">     578:</span>     <span class="k">/*</span>
<a name="579" /><span class="Maybe">     579:</span> <span class="k">     * Cumulative ns of schedule CPU time fo dead threads in the</span>
<a name="580" /><span class="Maybe">     580:</span> <span class="k">     * group, not including a zombie group leader, (This only differs</span>
<a name="581" /><span class="Maybe">     581:</span> <span class="k">     * from jiffies_to_ns(utime + stime) if sched_clock uses something</span>
<a name="582" /><span class="Maybe">     582:</span> <span class="k">     * other than jiffies.)</span>
<a name="583" /><span class="Maybe">     583:</span> <span class="k">     */</span>
<a name="584" /><span class="Maybe">     584:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">sum_sched_runtime</span><span class="f">;</span>
<a name="585" /><span class="Maybe">     585:</span> 
<a name="586" /><span class="Maybe">     586:</span>     <span class="k">/*</span>
<a name="587" /><span class="Maybe">     587:</span> <span class="k">     * We don&apos;t bother to synchronize most readers of this at all,</span>
<a name="588" /><span class="Maybe">     588:</span> <span class="k">     * because there is no reader checking a limit that actually needs</span>
<a name="589" /><span class="Maybe">     589:</span> <span class="k">     * to get both rlim_cur and rlim_max atomically, and either one</span>
<a name="590" /><span class="Maybe">     590:</span> <span class="k">     * alone is a single word that can safely be read normally.</span>
<a name="591" /><span class="Maybe">     591:</span> <span class="k">     * getrlimit/setrlimit use task_lock(current-&gt;group_leader) to</span>
<a name="592" /><span class="Maybe">     592:</span> <span class="k">     * protect this instead of the siglock, because they really</span>
<a name="593" /><span class="Maybe">     593:</span> <span class="k">     * have no need to disable irqs.</span>
<a name="594" /><span class="Maybe">     594:</span> <span class="k">     */</span>
<a name="595" /><span class="Maybe">     595:</span>     <span class="m">struct</span> <span class="b">rlimit</span> <span class="b">rlim</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_UkxJTV9OTElNSVRTXzA_"><span class="b">RLIM_NLIMITS</span></a><span class="f">]</span><span class="f">;</span>
<a name="596" /><span class="Maybe">     596:</span> 
<a name="597" /><span class="Maybe">     597:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JTRF9QUk9DRVNTX0FDQ1RfMA__"><span class="b">CONFIG_BSD_PROCESS_ACCT</span></a>
<a name="598" /><span class="Maybe">     598:</span>     <span class="m">struct</span> <span class="b">pacct_struct</span> <span class="b">pacct</span><span class="f">;</span>    <span class="k">/* per-process accounting information */</span>
<a name="599" /><span class="Maybe">     599:</span> <span class="f">#</span><span class="n">endif</span>
<a name="600" /><span class="Maybe">     600:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tTVEFUU18w"><span class="b">CONFIG_TASKSTATS</span></a>
<a name="601" /><span class="Maybe">     601:</span>     <span class="m">struct</span> <span class="b">taskstats</span> <span class="f">*</span><span class="b">stats</span><span class="f">;</span>
<a name="602" /><span class="Maybe">     602:</span> <span class="f">#</span><span class="n">endif</span>
<a name="603" /><span class="Maybe">     603:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0FVRElUXzA_"><span class="b">CONFIG_AUDIT</span></a>
<a name="604" /><span class="Maybe">     604:</span>     <span class="m">unsigned</span> <span class="b">audit_tty</span><span class="f">;</span>
<a name="605" /><span class="Maybe">     605:</span>     <span class="m">unsigned</span> <span class="b">audit_tty_log_passwd</span><span class="f">;</span>
<a name="606" /><span class="Maybe">     606:</span>     <span class="m">struct</span> <span class="b">tty_audit_buf</span> <span class="f">*</span><span class="b">tty_audit_buf</span><span class="f">;</span>
<a name="607" /><span class="Maybe">     607:</span> <span class="f">#</span><span class="n">endif</span>
<a name="608" /><span class="Maybe">     608:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NHUk9VUFNfMA__"><span class="b">CONFIG_CGROUPS</span></a>
<a name="609" /><span class="Maybe">     609:</span>     <span class="k">/*</span>
<a name="610" /><span class="Maybe">     610:</span> <span class="k">     * group_rwsem prevents new tasks from entering the threadgroup and</span>
<a name="611" /><span class="Maybe">     611:</span> <span class="k">     * member tasks from exiting,a more specifically, setting of</span>
<a name="612" /><span class="Maybe">     612:</span> <span class="k">     * PF_EXITING.  fork and exit paths are protected with this rwsem</span>
<a name="613" /><span class="Maybe">     613:</span> <span class="k">     * using threadgroup_change_begin/end().  Users which require</span>
<a name="614" /><span class="Maybe">     614:</span> <span class="k">     * threadgroup to remain stable should use threadgroup_[un]lock()</span>
<a name="615" /><span class="Maybe">     615:</span> <span class="k">     * which also takes care of exec path.  Currently, cgroup is the</span>
<a name="616" /><span class="Maybe">     616:</span> <span class="k">     * only user.</span>
<a name="617" /><span class="Maybe">     617:</span> <span class="k">     */</span>
<a name="618" /><span class="Maybe">     618:</span>     <span class="m">struct</span> <span class="b">rw_semaphore</span> <span class="b">group_rwsem</span><span class="f">;</span>
<a name="619" /><span class="Maybe">     619:</span> <span class="f">#</span><span class="n">endif</span>
<a name="620" /><span class="Maybe">     620:</span> 
<a name="621" /><span class="Maybe">     621:</span>     <span class="b">oom_flags_t</span> <span class="b">oom_flags</span><span class="f">;</span>
<a name="622" /><span class="Maybe">     622:</span>     <span class="m">short</span> <span class="b">oom_score_adj</span><span class="f">;</span>        <span class="k">/* OOM kill score adjustment */</span>
<a name="623" /><span class="Maybe">     623:</span>     <span class="m">short</span> <span class="b">oom_score_adj_min</span><span class="f">;</span>    <span class="k">/* OOM kill score adjustment min value.</span>
<a name="624" /><span class="Maybe">     624:</span> <span class="k">                     * Only settable by CAP_SYS_RESOURCE. */</span>
<a name="625" /><span class="Maybe">     625:</span> 
<a name="626" /><span class="Maybe">     626:</span>     <span class="m">struct</span> <span class="b">mutex</span> <span class="b">cred_guard_mutex</span><span class="f">;</span>    <span class="k">/* guard against foreign influences on</span>
<a name="627" /><span class="Maybe">     627:</span> <span class="k">                     * credential calculations</span>
<a name="628" /><span class="Maybe">     628:</span> <span class="k">                     * (notably. ptrace) */</span>
<a name="629" /><span class="Maybe">     629:</span> <span class="f">}</span><span class="f">;</span>
<a name="630" /><span class="Maybe">     630:</span> 
<a name="631" /><span class="Maybe">     631:</span> <span class="k">/*</span>
<a name="632" /><span class="Maybe">     632:</span> <span class="k"> * Bits in flags field of signal_struct.</span>
<a name="633" /><span class="Maybe">     633:</span> <span class="k"> */</span>
<a name="634" /><span class="Maybe">     634:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX1NUT1BfU1RPUFBFRF8w"><span class="b">SIGNAL_STOP_STOPPED</span></a>    <span class="c">0x00000001</span> <span class="k">/* job control stop in effect */</span>
<a name="635" /><span class="Maybe">     635:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX1NUT1BfQ09OVElOVUVEXzA_"><span class="b">SIGNAL_STOP_CONTINUED</span></a>    <span class="c">0x00000002</span> <span class="k">/* SIGCONT since WCONTINUED reap */</span>
<a name="636" /><span class="Maybe">     636:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_U0lHTkFMX0dST1VQX0VYSVRfMA__"><span class="b">SIGNAL_GROUP_EXIT</span></a>    <span class="c">0x00000004</span> <span class="k">/* group exit in progress */</span>
<a name="637" /><span class="Maybe">     637:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX0dST1VQX0NPUkVEVU1QXzA_"><span class="b">SIGNAL_GROUP_COREDUMP</span></a>    <span class="c">0x00000008</span> <span class="k">/* coredump in progress */</span>
<a name="638" /><span class="Maybe">     638:</span> <span class="k">/*</span>
<a name="639" /><span class="Maybe">     639:</span> <span class="k"> * Pending notifications to parent.</span>
<a name="640" /><span class="Maybe">     640:</span> <span class="k"> */</span>
<a name="641" /><span class="Maybe">     641:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX0NMRF9TVE9QUEVEXzA_"><span class="b">SIGNAL_CLD_STOPPED</span></a>    <span class="c">0x00000010</span>
<a name="642" /><span class="Maybe">     642:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX0NMRF9DT05USU5VRURfMA__"><span class="b">SIGNAL_CLD_CONTINUED</span></a>    <span class="c">0x00000020</span>
<a name="643" /><span class="Maybe">     643:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX0NMRF9NQVNLXzA_"><span class="b">SIGNAL_CLD_MASK</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_U0lHTkFMX0NMRF9TVE9QUEVEXzA_"><span class="b">SIGNAL_CLD_STOPPED</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_U0lHTkFMX0NMRF9DT05USU5VRURfMA__"><span class="b">SIGNAL_CLD_CONTINUED</span></a><span class="f">)</span>
<a name="644" /><span class="Maybe">     644:</span> 
<a name="645" /><span class="Maybe">     645:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lHTkFMX1VOS0lMTEFCTEVfMA__"><span class="b">SIGNAL_UNKILLABLE</span></a>    <span class="c">0x00000040</span> <span class="k">/* for init: ignore fatal signals */</span>
<a name="646" /><span class="Maybe">     646:</span> 
<a name="647" /><span class="Maybe">     647:</span> <span class="k">/* If true, all threads except -&gt;group_exit_task have pending SIGKILL */</span>
<a name="648" /><span class="Maybe">     648:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">signal_group_exit</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span>
<a name="649" /><span class="Maybe">     649:</span> <span class="f">{</span>
<a name="650" /><span class="Maybe">     650:</span>     <span class="m">return</span>    <span class="f">(</span><span class="b">sig</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U0lHTkFMX0dST1VQX0VYSVRfMA__"><span class="b">SIGNAL_GROUP_EXIT</span></a><span class="f">)</span> <span class="f">||</span>
<a name="651" /><span class="Maybe">     651:</span>         <span class="f">(</span><span class="b">sig</span><span class="f">-&gt;</span><span class="b">group_exit_task</span> <span class="f">!=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="652" /><span class="Maybe">     652:</span> <span class="f">}</span>
<a name="653" /><span class="Maybe">     653:</span> 
<a name="654" /><span class="Maybe">     654:</span> <span class="k">/*</span>
<a name="655" /><span class="Maybe">     655:</span> <span class="k"> * Some day this will be a full-fledged user tracking system..</span>
<a name="656" /><span class="Maybe">     656:</span> <span class="k"> */</span>
<a name="657" /><span class="Maybe">     657:</span> <span class="m">struct</span> <span class="b">user_struct</span> <span class="f">{</span>
<a name="658" /><span class="Maybe">     658:</span>     <span class="b">atomic_t</span> <span class="b">__count</span><span class="f">;</span>    <span class="k">/* reference count */</span>
<a name="659" /><span class="Maybe">     659:</span>     <span class="b">atomic_t</span> <span class="b">processes</span><span class="f">;</span>    <span class="k">/* How many processes does this user have? */</span>
<a name="660" /><span class="Maybe">     660:</span>     <span class="b">atomic_t</span> <span class="b">files</span><span class="f">;</span>        <span class="k">/* How many open files does this user have? */</span>
<a name="661" /><span class="Maybe">     661:</span>     <span class="b">atomic_t</span> <span class="b">sigpending</span><span class="f">;</span>    <span class="k">/* How many pending signals does this user have? */</span>
<a name="662" /><span class="Maybe">     662:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0lOT1RJRllfVVNFUl8w"><span class="b">CONFIG_INOTIFY_USER</span></a>
<a name="663" /><span class="Maybe">     663:</span>     <span class="b">atomic_t</span> <span class="b">inotify_watches</span><span class="f">;</span> <span class="k">/* How many inotify watches does this user have? */</span>
<a name="664" /><span class="Maybe">     664:</span>     <span class="b">atomic_t</span> <span class="b">inotify_devs</span><span class="f">;</span>    <span class="k">/* How many inotify devs does this user have opened? */</span>
<a name="665" /><span class="Maybe">     665:</span> <span class="f">#</span><span class="n">endif</span>
<a name="666" /><span class="Maybe">     666:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZBTk9USUZZXzA_"><span class="b">CONFIG_FANOTIFY</span></a>
<a name="667" /><span class="Maybe">     667:</span>     <span class="b">atomic_t</span> <span class="b">fanotify_listeners</span><span class="f">;</span>
<a name="668" /><span class="Maybe">     668:</span> <span class="f">#</span><span class="n">endif</span>
<a name="669" /><span class="Maybe">     669:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0VQT0xMXzA_"><span class="b">CONFIG_EPOLL</span></a>
<a name="670" /><span class="Maybe">     670:</span>     <span class="b">atomic_long_t</span> <span class="b">epoll_watches</span><span class="f">;</span> <span class="k">/* The number of file descriptors currently watched */</span>
<a name="671" /><span class="Maybe">     671:</span> <span class="f">#</span><span class="n">endif</span>
<a name="672" /><span class="Maybe">     672:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BPU0lYX01RVUVVRV8w"><span class="b">CONFIG_POSIX_MQUEUE</span></a>
<a name="673" /><span class="Maybe">     673:</span>     <span class="k">/* protected by mq_lock    */</span>
<a name="674" /><span class="Maybe">     674:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">mq_bytes</span><span class="f">;</span>    <span class="k">/* How many bytes can be allocated to mqueue? */</span>
<a name="675" /><span class="Maybe">     675:</span> <span class="f">#</span><span class="n">endif</span>
<a name="676" /><span class="Maybe">     676:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">locked_shm</span><span class="f">;</span> <span class="k">/* How many pages of mlocked shm ? */</span>
<a name="677" /><span class="Maybe">     677:</span> 
<a name="678" /><span class="Maybe">     678:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0tFWVNfMA__"><span class="b">CONFIG_KEYS</span></a>
<a name="679" /><span class="Maybe">     679:</span>     <span class="m">struct</span> <span class="b">key</span> <span class="f">*</span><span class="b">uid_keyring</span><span class="f">;</span>    <span class="k">/* UID specific keyring */</span>
<a name="680" /><span class="Maybe">     680:</span>     <span class="m">struct</span> <span class="b">key</span> <span class="f">*</span><span class="b">session_keyring</span><span class="f">;</span>    <span class="k">/* UID&apos;s default session keyring */</span>
<a name="681" /><span class="Maybe">     681:</span> <span class="f">#</span><span class="n">endif</span>
<a name="682" /><span class="Maybe">     682:</span> 
<a name="683" /><span class="Maybe">     683:</span>     <span class="k">/* Hash table maintenance information */</span>
<a name="684" /><span class="Maybe">     684:</span>     <span class="m">struct</span> <span class="b">hlist_node</span> <span class="b">uidhash_node</span><span class="f">;</span>
<a name="685" /><span class="Maybe">     685:</span>     <span class="b">kuid_t</span> <span class="b">uid</span><span class="f">;</span>
<a name="686" /><span class="Maybe">     686:</span> 
<a name="687" /><span class="Maybe">     687:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BFUkZfRVZFTlRTXzA_"><span class="b">CONFIG_PERF_EVENTS</span></a>
<a name="688" /><span class="Maybe">     688:</span>     <span class="b">atomic_long_t</span> <span class="b">locked_vm</span><span class="f">;</span>
<a name="689" /><span class="Maybe">     689:</span> <span class="f">#</span><span class="n">endif</span>
<a name="690" /><span class="Maybe">     690:</span> <span class="f">}</span><span class="f">;</span>
<a name="691" /><span class="Maybe">     691:</span> 
<a name="692" /><span class="Maybe">     692:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">uids_sysfs_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="693" /><span class="Maybe">     693:</span> 
<a name="694" /><span class="Maybe">     694:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span><span class="b">find_user</span><span class="f">(</span><span class="b">kuid_t</span><span class="f">)</span><span class="f">;</span>
<a name="695" /><span class="Maybe">     695:</span> 
<a name="696" /><span class="Maybe">     696:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">user_struct</span> <span class="b">root_user</span><span class="f">;</span>
<a name="697" /><span class="Maybe">     697:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9VU0VSXzA_"><span class="b">INIT_USER</span></a> <span class="f">(</span><span class="f">&amp;</span><span class="b">root_user</span><span class="f">)</span>
<a name="698" /><span class="Maybe">     698:</span> 
<a name="699" /><span class="Maybe">     699:</span> 
<a name="700" /><span class="Maybe">     700:</span> <span class="m">struct</span> <span class="b">backing_dev_info</span><span class="f">;</span>
<a name="701" /><span class="Maybe">     701:</span> <span class="m">struct</span> <span class="b">reclaim_state</span><span class="f">;</span>
<a name="702" /><span class="Maybe">     702:</span> 
<a name="703" /><span class="Maybe">     703:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a><span class="f">)</span> <span class="f">||</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfREVMQVlfQUNDVF8w"><span class="b">CONFIG_TASK_DELAY_ACCT</span></a><span class="f">)</span>
<a name="704" /><span class="Maybe">     704:</span> <span class="m">struct</span> <span class="b">sched_info</span> <span class="f">{</span>
<a name="705" /><span class="Maybe">     705:</span>     <span class="k">/* cumulative counters */</span>
<a name="706" /><span class="Maybe">     706:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">pcount</span><span class="f">;</span>          <span class="k">/* # of times run on this cpu */</span>
<a name="707" /><span class="Maybe">     707:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">run_delay</span><span class="f">;</span> <span class="k">/* time spent waiting on a runqueue */</span>
<a name="708" /><span class="Maybe">     708:</span> 
<a name="709" /><span class="Maybe">     709:</span>     <span class="k">/* timestamps */</span>
<a name="710" /><span class="Maybe">     710:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">last_arrival</span><span class="f">,</span><span class="k">/* when we last ran on a cpu */</span>
<a name="711" /><span class="Maybe">     711:</span>                <span class="b">last_queued</span><span class="f">;</span>    <span class="k">/* when we were last queued to run */</span>
<a name="712" /><span class="Maybe">     712:</span> <span class="f">}</span><span class="f">;</span>
<a name="713" /><span class="Maybe">     713:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */</span>
<a name="714" /><span class="Maybe">     714:</span> 
<a name="715" /><span class="Maybe">     715:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfREVMQVlfQUNDVF8w"><span class="b">CONFIG_TASK_DELAY_ACCT</span></a>
<a name="716" /><span class="Maybe">     716:</span> <span class="m">struct</span> <span class="b">task_delay_info</span> <span class="f">{</span>
<a name="717" /><span class="Maybe">     717:</span>     <span class="b">spinlock_t</span>    <span class="b">lock</span><span class="f">;</span>
<a name="718" /><span class="Maybe">     718:</span>     <span class="m">unsigned</span> <span class="m">int</span>    <span class="b">flags</span><span class="f">;</span>    <span class="k">/* Private per-task flags */</span>
<a name="719" /><span class="Maybe">     719:</span> 
<a name="720" /><span class="Maybe">     720:</span>     <span class="k">/* For each stat XXX, add following, aligned appropriately</span>
<a name="721" /><span class="Maybe">     721:</span> <span class="k">     *</span>
<a name="722" /><span class="Maybe">     722:</span> <span class="k">     * struct timespec XXX_start, XXX_end;</span>
<a name="723" /><span class="Maybe">     723:</span> <span class="k">     * u64 XXX_delay;</span>
<a name="724" /><span class="Maybe">     724:</span> <span class="k">     * u32 XXX_count;</span>
<a name="725" /><span class="Maybe">     725:</span> <span class="k">     *</span>
<a name="726" /><span class="Maybe">     726:</span> <span class="k">     * Atomicity of updates to XXX_delay, XXX_count protected by</span>
<a name="727" /><span class="Maybe">     727:</span> <span class="k">     * single lock above (split into XXX_lock if contention is an issue).</span>
<a name="728" /><span class="Maybe">     728:</span> <span class="k">     */</span>
<a name="729" /><span class="Maybe">     729:</span> 
<a name="730" /><span class="Maybe">     730:</span>     <span class="k">/*</span>
<a name="731" /><span class="Maybe">     731:</span> <span class="k">     * XXX_count is incremented on every XXX operation, the delay</span>
<a name="732" /><span class="Maybe">     732:</span> <span class="k">     * associated with the operation is added to XXX_delay.</span>
<a name="733" /><span class="Maybe">     733:</span> <span class="k">     * XXX_delay contains the accumulated delay time in nanoseconds.</span>
<a name="734" /><span class="Maybe">     734:</span> <span class="k">     */</span>
<a name="735" /><span class="Maybe">     735:</span>     <span class="m">struct</span> <span class="b">timespec</span> <span class="b">blkio_start</span><span class="f">,</span> <span class="b">blkio_end</span><span class="f">;</span>    <span class="k">/* Shared by blkio, swapin */</span>
<a name="736" /><span class="Maybe">     736:</span>     <span class="b">u64</span> <span class="b">blkio_delay</span><span class="f">;</span>    <span class="k">/* wait for sync block io completion */</span>
<a name="737" /><span class="Maybe">     737:</span>     <span class="b">u64</span> <span class="b">swapin_delay</span><span class="f">;</span>    <span class="k">/* wait for swapin block io completion */</span>
<a name="738" /><span class="Maybe">     738:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">blkio_count</span><span class="f">;</span>    <span class="k">/* total count of the number of sync block */</span>
<a name="739" /><span class="Maybe">     739:</span>                 <span class="k">/* io operations performed */</span>
<a name="740" /><span class="Maybe">     740:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">swapin_count</span><span class="f">;</span>    <span class="k">/* total count of the number of swapin block */</span>
<a name="741" /><span class="Maybe">     741:</span>                 <span class="k">/* io operations performed */</span>
<a name="742" /><span class="Maybe">     742:</span> 
<a name="743" /><span class="Maybe">     743:</span>     <span class="m">struct</span> <span class="b">timespec</span> <span class="b">freepages_start</span><span class="f">,</span> <span class="b">freepages_end</span><span class="f">;</span>
<a name="744" /><span class="Maybe">     744:</span>     <span class="b">u64</span> <span class="b">freepages_delay</span><span class="f">;</span>    <span class="k">/* wait for memory reclaim */</span>
<a name="745" /><span class="Maybe">     745:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">freepages_count</span><span class="f">;</span>    <span class="k">/* total count of memory reclaim */</span>
<a name="746" /><span class="Maybe">     746:</span> <span class="f">}</span><span class="f">;</span>
<a name="747" /><span class="Maybe">     747:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* CONFIG_TASK_DELAY_ACCT */</span>
<a name="748" /><span class="Maybe">     748:</span> 
<a name="749" /><span class="Maybe">     749:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sched_info_on</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="750" /><span class="Maybe">     750:</span> <span class="f">{</span>
<a name="751" /><span class="Maybe">     751:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a>
<a name="752" /><span class="Maybe">     752:</span>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="753" /><span class="False">     753:</span> <span class="f">#</span><span class="n">elif</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfREVMQVlfQUNDVF8w"><span class="b">CONFIG_TASK_DELAY_ACCT</span></a><span class="f">)</span>
<a name="754" /><span class="False">     754:</span>     <span class="m">extern</span> <span class="m">int</span> <span class="b">delayacct_on</span><span class="f">;</span>
<a name="755" /><span class="False">     755:</span>     <span class="m">return</span> <span class="b">delayacct_on</span><span class="f">;</span>
<a name="756" /><span class="False">     756:</span> <span class="f">#</span><span class="n">else</span>
<a name="757" /><span class="False">     757:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="758" /><span class="Maybe">     758:</span> <span class="f">#</span><span class="n">endif</span>
<a name="759" /><span class="Maybe">     759:</span> <span class="f">}</span>
<a name="760" /><span class="Maybe">     760:</span> 
<a name="761" /><span class="Maybe">     761:</span> <span class="m">enum</span> <span class="b">cpu_idle_type</span> <span class="f">{</span>
<a name="762" /><span class="Maybe">     762:</span>     <span class="b">CPU_IDLE</span><span class="f">,</span>
<a name="763" /><span class="Maybe">     763:</span>     <span class="b">CPU_NOT_IDLE</span><span class="f">,</span>
<a name="764" /><span class="Maybe">     764:</span>     <span class="b">CPU_NEWLY_IDLE</span><span class="f">,</span>
<a name="765" /><span class="Maybe">     765:</span>     <span class="b">CPU_MAX_IDLE_TYPES</span>
<a name="766" /><span class="Maybe">     766:</span> <span class="f">}</span><span class="f">;</span>
<a name="767" /><span class="Maybe">     767:</span> 
<a name="768" /><span class="Maybe">     768:</span> <span class="k">/*</span>
<a name="769" /><span class="Maybe">     769:</span> <span class="k"> * Increase resolution of cpu_power calculations</span>
<a name="770" /><span class="Maybe">     770:</span> <span class="k"> */</span>
<a name="771" /><span class="Maybe">     771:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0NIRURfUE9XRVJfU0hJRlRfMA__"><span class="b">SCHED_POWER_SHIFT</span></a>    <span class="c">10</span>
<a name="772" /><span class="Maybe">     772:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0NIRURfUE9XRVJfU0NBTEVfMA__"><span class="b">SCHED_POWER_SCALE</span></a>    <span class="f">(</span><span class="c">1L</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_U0NIRURfUE9XRVJfU0hJRlRfMA__"><span class="b">SCHED_POWER_SHIFT</span></a><span class="f">)</span>
<a name="773" /><span class="Maybe">     773:</span> 
<a name="774" /><span class="Maybe">     774:</span> <span class="k">/*</span>
<a name="775" /><span class="Maybe">     775:</span> <span class="k"> * sched-domains (multiprocessor balancing) declarations:</span>
<a name="776" /><span class="Maybe">     776:</span> <span class="k"> */</span>
<a name="777" /><span class="Maybe">     777:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="778" /><span class="Maybe">     778:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfTE9BRF9CQUxBTkNFXzA_"><span class="b">SD_LOAD_BALANCE</span></a>        <span class="c">0x0001</span>    <span class="k">/* Do load balancing on this domain. */</span>
<a name="779" /><span class="Maybe">     779:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQkFMQU5DRV9ORVdJRExFXzA_"><span class="b">SD_BALANCE_NEWIDLE</span></a>    <span class="c">0x0002</span>    <span class="k">/* Balance when about to become idle */</span>
<a name="780" /><span class="Maybe">     780:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQkFMQU5DRV9FWEVDXzA_"><span class="b">SD_BALANCE_EXEC</span></a>        <span class="c">0x0004</span>    <span class="k">/* Balance on exec */</span>
<a name="781" /><span class="Maybe">     781:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQkFMQU5DRV9GT1JLXzA_"><span class="b">SD_BALANCE_FORK</span></a>        <span class="c">0x0008</span>    <span class="k">/* Balance on fork, clone */</span>
<a name="782" /><span class="Maybe">     782:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQkFMQU5DRV9XQUtFXzA_"><span class="b">SD_BALANCE_WAKE</span></a>        <span class="c">0x0010</span>  <span class="k">/* Balance on wakeup */</span>
<a name="783" /><span class="Maybe">     783:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfV0FLRV9BRkZJTkVfMA__"><span class="b">SD_WAKE_AFFINE</span></a>        <span class="c">0x0020</span>    <span class="k">/* Wake task to waking CPU */</span>
<a name="784" /><span class="Maybe">     784:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfU0hBUkVfQ1BVUE9XRVJfMA__"><span class="b">SD_SHARE_CPUPOWER</span></a>    <span class="c">0x0080</span>    <span class="k">/* Domain members share cpu power */</span>
<a name="785" /><span class="Maybe">     785:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfU0hBUkVfUEtHX1JFU09VUkNFU18w"><span class="b">SD_SHARE_PKG_RESOURCES</span></a>    <span class="c">0x0200</span>    <span class="k">/* Domain members share cpu pkg resources */</span>
<a name="786" /><span class="Maybe">     786:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfU0VSSUFMSVpFXzA_"><span class="b">SD_SERIALIZE</span></a>        <span class="c">0x0400</span>    <span class="k">/* Only a single load balancing instance */</span>
<a name="787" /><span class="Maybe">     787:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQVNZTV9QQUNLSU5HXzA_"><span class="b">SD_ASYM_PACKING</span></a>        <span class="c">0x0800</span>  <span class="k">/* Place busy groups earlier in the domain */</span>
<a name="788" /><span class="Maybe">     788:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfUFJFRkVSX1NJQkxJTkdfMA__"><span class="b">SD_PREFER_SIBLING</span></a>    <span class="c">0x1000</span>    <span class="k">/* Prefer to place tasks in a sibling domain */</span>
<a name="789" /><span class="Maybe">     789:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfT1ZFUkxBUF8w"><span class="b">SD_OVERLAP</span></a>        <span class="c">0x2000</span>    <span class="k">/* sched_domains of this level overlap */</span>
<a name="790" /><span class="Maybe">     790:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfTlVNQV8w"><span class="b">SD_NUMA</span></a>            <span class="c">0x4000</span>    <span class="k">/* cross-node balancing */</span>
<a name="791" /><span class="Maybe">     791:</span> 
<a name="792" /><span class="Maybe">     792:</span> <span class="m">extern</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X193ZWFrXzA_"><span class="b">__weak</span></a> <span class="b">arch_sd_sibiling_asym_packing</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="793" /><span class="Maybe">     793:</span> 
<a name="794" /><span class="Maybe">     794:</span> <span class="m">struct</span> <span class="b">sched_domain_attr</span> <span class="f">{</span>
<a name="795" /><span class="Maybe">     795:</span>     <span class="m">int</span> <span class="b">relax_domain_level</span><span class="f">;</span>
<a name="796" /><span class="Maybe">     796:</span> <span class="f">}</span><span class="f">;</span>
<a name="797" /><span class="Maybe">     797:</span> 
<a name="798" /><span class="Maybe">     798:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0RfQVRUUl9JTklUXzA_"><span class="b">SD_ATTR_INIT</span></a>    <span class="f">(</span><span class="m">struct</span> <span class="b">sched_domain_attr</span><span class="f">)</span> <span class="f">{</span>    \
<a name="799" /><span class="Maybe">     799:</span>     <span class="f">.</span><span class="b">relax_domain_level</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">,</span>            \
<a name="800" /><span class="Maybe">     800:</span> <span class="f">}</span>
<a name="801" /><span class="Maybe">     801:</span> 
<a name="802" /><span class="Maybe">     802:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sched_domain_level_max</span><span class="f">;</span>
<a name="803" /><span class="Maybe">     803:</span> 
<a name="804" /><span class="Maybe">     804:</span> <span class="m">struct</span> <span class="b">sched_group</span><span class="f">;</span>
<a name="805" /><span class="Maybe">     805:</span> 
<a name="806" /><span class="Maybe">     806:</span> <span class="m">struct</span> <span class="b">sched_domain</span> <span class="f">{</span>
<a name="807" /><span class="Maybe">     807:</span>     <span class="k">/* These fields must be setup */</span>
<a name="808" /><span class="Maybe">     808:</span>     <span class="m">struct</span> <span class="b">sched_domain</span> <span class="f">*</span><span class="b">parent</span><span class="f">;</span>    <span class="k">/* top domain must be null terminated */</span>
<a name="809" /><span class="Maybe">     809:</span>     <span class="m">struct</span> <span class="b">sched_domain</span> <span class="f">*</span><span class="b">child</span><span class="f">;</span>    <span class="k">/* bottom domain must be null terminated */</span>
<a name="810" /><span class="Maybe">     810:</span>     <span class="m">struct</span> <span class="b">sched_group</span> <span class="f">*</span><span class="b">groups</span><span class="f">;</span>    <span class="k">/* the balancing groups of the domain */</span>
<a name="811" /><span class="Maybe">     811:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">min_interval</span><span class="f">;</span>    <span class="k">/* Minimum balance interval ms */</span>
<a name="812" /><span class="Maybe">     812:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">max_interval</span><span class="f">;</span>    <span class="k">/* Maximum balance interval ms */</span>
<a name="813" /><span class="Maybe">     813:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">busy_factor</span><span class="f">;</span>    <span class="k">/* less balancing by factor if busy */</span>
<a name="814" /><span class="Maybe">     814:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">imbalance_pct</span><span class="f">;</span>    <span class="k">/* No balance until over watermark */</span>
<a name="815" /><span class="Maybe">     815:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cache_nice_tries</span><span class="f">;</span>    <span class="k">/* Leave cache hot tasks for # tries */</span>
<a name="816" /><span class="Maybe">     816:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">busy_idx</span><span class="f">;</span>
<a name="817" /><span class="Maybe">     817:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">idle_idx</span><span class="f">;</span>
<a name="818" /><span class="Maybe">     818:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">newidle_idx</span><span class="f">;</span>
<a name="819" /><span class="Maybe">     819:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">wake_idx</span><span class="f">;</span>
<a name="820" /><span class="Maybe">     820:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">forkexec_idx</span><span class="f">;</span>
<a name="821" /><span class="Maybe">     821:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">smt_gain</span><span class="f">;</span>
<a name="822" /><span class="Maybe">     822:</span> 
<a name="823" /><span class="Maybe">     823:</span>     <span class="m">int</span> <span class="b">nohz_idle</span><span class="f">;</span>            <span class="k">/* NOHZ IDLE status */</span>
<a name="824" /><span class="Maybe">     824:</span>     <span class="m">int</span> <span class="b">flags</span><span class="f">;</span>            <span class="k">/* See SD_* */</span>
<a name="825" /><span class="Maybe">     825:</span>     <span class="m">int</span> <span class="b">level</span><span class="f">;</span>
<a name="826" /><span class="Maybe">     826:</span> 
<a name="827" /><span class="Maybe">     827:</span>     <span class="k">/* Runtime fields. */</span>
<a name="828" /><span class="Maybe">     828:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">last_balance</span><span class="f">;</span>    <span class="k">/* init to jiffies. units in jiffies */</span>
<a name="829" /><span class="Maybe">     829:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">balance_interval</span><span class="f">;</span>    <span class="k">/* initialise to 1. units in ms. */</span>
<a name="830" /><span class="Maybe">     830:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">nr_balance_failed</span><span class="f">;</span> <span class="k">/* initialise to 0 */</span>
<a name="831" /><span class="Maybe">     831:</span> 
<a name="832" /><span class="Maybe">     832:</span>     <span class="k">/* idle_balance() stats */</span>
<a name="833" /><span class="Maybe">     833:</span>     <span class="b">u64</span> <span class="b">max_newidle_lb_cost</span><span class="f">;</span>
<a name="834" /><span class="Maybe">     834:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">next_decay_max_lb_cost</span><span class="f">;</span>
<a name="835" /><span class="Maybe">     835:</span> 
<a name="836" /><span class="Maybe">     836:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a>
<a name="837" /><span class="Maybe">     837:</span>     <span class="k">/* load_balance() stats */</span>
<a name="838" /><span class="Maybe">     838:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_count</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="839" /><span class="Maybe">     839:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_failed</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="840" /><span class="Maybe">     840:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_balanced</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="841" /><span class="Maybe">     841:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_imbalance</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="842" /><span class="Maybe">     842:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_gained</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="843" /><span class="Maybe">     843:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_hot_gained</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="844" /><span class="Maybe">     844:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_nobusyg</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="845" /><span class="Maybe">     845:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lb_nobusyq</span><span class="f">[</span><span class="b">CPU_MAX_IDLE_TYPES</span><span class="f">]</span><span class="f">;</span>
<a name="846" /><span class="Maybe">     846:</span> 
<a name="847" /><span class="Maybe">     847:</span>     <span class="k">/* Active load balancing */</span>
<a name="848" /><span class="Maybe">     848:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">alb_count</span><span class="f">;</span>
<a name="849" /><span class="Maybe">     849:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">alb_failed</span><span class="f">;</span>
<a name="850" /><span class="Maybe">     850:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">alb_pushed</span><span class="f">;</span>
<a name="851" /><span class="Maybe">     851:</span> 
<a name="852" /><span class="Maybe">     852:</span>     <span class="k">/* SD_BALANCE_EXEC stats */</span>
<a name="853" /><span class="Maybe">     853:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbe_count</span><span class="f">;</span>
<a name="854" /><span class="Maybe">     854:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbe_balanced</span><span class="f">;</span>
<a name="855" /><span class="Maybe">     855:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbe_pushed</span><span class="f">;</span>
<a name="856" /><span class="Maybe">     856:</span> 
<a name="857" /><span class="Maybe">     857:</span>     <span class="k">/* SD_BALANCE_FORK stats */</span>
<a name="858" /><span class="Maybe">     858:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbf_count</span><span class="f">;</span>
<a name="859" /><span class="Maybe">     859:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbf_balanced</span><span class="f">;</span>
<a name="860" /><span class="Maybe">     860:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sbf_pushed</span><span class="f">;</span>
<a name="861" /><span class="Maybe">     861:</span> 
<a name="862" /><span class="Maybe">     862:</span>     <span class="k">/* try_to_wake_up() stats */</span>
<a name="863" /><span class="Maybe">     863:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ttwu_wake_remote</span><span class="f">;</span>
<a name="864" /><span class="Maybe">     864:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ttwu_move_affine</span><span class="f">;</span>
<a name="865" /><span class="Maybe">     865:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ttwu_move_balance</span><span class="f">;</span>
<a name="866" /><span class="Maybe">     866:</span> <span class="f">#</span><span class="n">endif</span>
<a name="867" /><span class="Maybe">     867:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEX0RFQlVHXzA_"><span class="b">CONFIG_SCHED_DEBUG</span></a>
<a name="868" /><span class="Maybe">     868:</span>     <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="869" /><span class="Maybe">     869:</span> <span class="f">#</span><span class="n">endif</span>
<a name="870" /><span class="Maybe">     870:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="871" /><span class="Maybe">     871:</span>         <span class="m">void</span> <span class="f">*</span><span class="m">private</span><span class="f">;</span>        <span class="k">/* used during construction */</span>
<a name="872" /><span class="Maybe">     872:</span>         <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a> <span class="b">rcu</span><span class="f">;</span>    <span class="k">/* used during destruction */</span>
<a name="873" /><span class="Maybe">     873:</span>     <span class="f">}</span><span class="f">;</span>
<a name="874" /><span class="Maybe">     874:</span> 
<a name="875" /><span class="Maybe">     875:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">span_weight</span><span class="f">;</span>
<a name="876" /><span class="Maybe">     876:</span>     <span class="k">/*</span>
<a name="877" /><span class="Maybe">     877:</span> <span class="k">     * Span of all CPUs in this domain.</span>
<a name="878" /><span class="Maybe">     878:</span> <span class="k">     *</span>
<a name="879" /><span class="Maybe">     879:</span> <span class="k">     * NOTE: this field is variable length. (Allocated dynamically</span>
<a name="880" /><span class="Maybe">     880:</span> <span class="k">     * by attaching extra space to the end of the structure,</span>
<a name="881" /><span class="Maybe">     881:</span> <span class="k">     * depending on how many CPUs the kernel has booted up with)</span>
<a name="882" /><span class="Maybe">     882:</span> <span class="k">     */</span>
<a name="883" /><span class="Maybe">     883:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">span</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">;</span>
<a name="884" /><span class="Maybe">     884:</span> <span class="f">}</span><span class="f">;</span>
<a name="885" /><span class="Maybe">     885:</span> 
<a name="886" /><span class="Maybe">     886:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">sched_domain_span</span><span class="f">(</span><span class="m">struct</span> <span class="b">sched_domain</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span>
<a name="887" /><span class="Maybe">     887:</span> <span class="f">{</span>
<a name="888" /><span class="Maybe">     888:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dG9fY3B1bWFza18w"><span class="b">to_cpumask</span></a><span class="f">(</span><span class="b">sd</span><span class="f">-&gt;</span><span class="b">span</span><span class="f">)</span><span class="f">;</span>
<a name="889" /><span class="Maybe">     889:</span> <span class="f">}</span>
<a name="890" /><span class="Maybe">     890:</span> 
<a name="891" /><span class="Maybe">     891:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">partition_sched_domains</span><span class="f">(</span><span class="m">int</span> <span class="b">ndoms_new</span><span class="f">,</span> <span class="b">cpumask_var_t</span> <span class="b">doms_new</span><span class="f">[</span><span class="f">]</span><span class="f">,</span>
<a name="892" /><span class="Maybe">     892:</span>                     <span class="m">struct</span> <span class="b">sched_domain_attr</span> <span class="f">*</span><span class="b">dattr_new</span><span class="f">)</span><span class="f">;</span>
<a name="893" /><span class="Maybe">     893:</span> 
<a name="894" /><span class="Maybe">     894:</span> <span class="k">/* Allocate an array of sched domains, for partition_sched_domains(). */</span>
<a name="895" /><span class="Maybe">     895:</span> <span class="b">cpumask_var_t</span> <span class="f">*</span><span class="b">alloc_sched_domains</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">ndoms</span><span class="f">)</span><span class="f">;</span>
<a name="896" /><span class="Maybe">     896:</span> <span class="m">void</span> <span class="b">free_sched_domains</span><span class="f">(</span><span class="b">cpumask_var_t</span> <span class="b">doms</span><span class="f">[</span><span class="f">]</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ndoms</span><span class="f">)</span><span class="f">;</span>
<a name="897" /><span class="Maybe">     897:</span> 
<a name="898" /><span class="Maybe">     898:</span> <span class="m">bool</span> <span class="b">cpus_share_cache</span><span class="f">(</span><span class="m">int</span> <span class="b">this_cpu</span><span class="f">,</span> <span class="m">int</span> <span class="b">that_cpu</span><span class="f">)</span><span class="f">;</span>
<a name="899" /><span class="Maybe">     899:</span> 
<a name="900" /><span class="False">     900:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* CONFIG_SMP */</span>
<a name="901" /><span class="False">     901:</span> 
<a name="902" /><span class="False">     902:</span> <span class="m">struct</span> <span class="b">sched_domain_attr</span><span class="f">;</span>
<a name="903" /><span class="False">     903:</span> 
<a name="904" /><span class="False">     904:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span>
<a name="905" /><span class="False">     905:</span> <span class="b">partition_sched_domains</span><span class="f">(</span><span class="m">int</span> <span class="b">ndoms_new</span><span class="f">,</span> <span class="b">cpumask_var_t</span> <span class="b">doms_new</span><span class="f">[</span><span class="f">]</span><span class="f">,</span>
<a name="906" /><span class="False">     906:</span>             <span class="m">struct</span> <span class="b">sched_domain_attr</span> <span class="f">*</span><span class="b">dattr_new</span><span class="f">)</span>
<a name="907" /><span class="False">     907:</span> <span class="f">{</span>
<a name="908" /><span class="False">     908:</span> <span class="f">}</span>
<a name="909" /><span class="False">     909:</span> 
<a name="910" /><span class="False">     910:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">cpus_share_cache</span><span class="f">(</span><span class="m">int</span> <span class="b">this_cpu</span><span class="f">,</span> <span class="m">int</span> <span class="b">that_cpu</span><span class="f">)</span>
<a name="911" /><span class="False">     911:</span> <span class="f">{</span>
<a name="912" /><span class="False">     912:</span>     <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="913" /><span class="False">     913:</span> <span class="f">}</span>
<a name="914" /><span class="False">     914:</span> 
<a name="915" /><span class="Maybe">     915:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* !CONFIG_SMP */</span>
<a name="916" /><span class="Maybe">     916:</span> 
<a name="917" /><span class="Maybe">     917:</span> 
<a name="918" /><span class="Maybe">     918:</span> <span class="m">struct</span> <span class="b">io_context</span><span class="f">;</span>            <span class="k">/* See blkdev.h */</span>
<a name="919" /><span class="Maybe">     919:</span> 
<a name="920" /><span class="Maybe">     920:</span> 
<a name="921" /><span class="False">     921:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">ARCH_HAS_PREFETCH_SWITCH_STACK</span>
<a name="922" /><span class="False">     922:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">prefetch_stack</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span><span class="f">;</span>
<a name="923" /><span class="Maybe">     923:</span> <span class="f">#</span><span class="n">else</span>
<a name="924" /><span class="Maybe">     924:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">prefetch_stack</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="925" /><span class="Maybe">     925:</span> <span class="f">#</span><span class="n">endif</span>
<a name="926" /><span class="Maybe">     926:</span> 
<a name="927" /><span class="Maybe">     927:</span> <span class="m">struct</span> <span class="b">audit_context</span><span class="f">;</span>        <span class="k">/* See audit.c */</span>
<a name="928" /><span class="Maybe">     928:</span> <span class="m">struct</span> <span class="b">mempolicy</span><span class="f">;</span>
<a name="929" /><span class="Maybe">     929:</span> <span class="m">struct</span> <span class="b">pipe_inode_info</span><span class="f">;</span>
<a name="930" /><span class="Maybe">     930:</span> <span class="m">struct</span> <span class="b">uts_namespace</span><span class="f">;</span>
<a name="931" /><span class="Maybe">     931:</span> 
<a name="932" /><span class="Maybe">     932:</span> <span class="m">struct</span> <span class="b">load_weight</span> <span class="f">{</span>
<a name="933" /><span class="Maybe">     933:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">weight</span><span class="f">;</span>
<a name="934" /><span class="Maybe">     934:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">inv_weight</span><span class="f">;</span>
<a name="935" /><span class="Maybe">     935:</span> <span class="f">}</span><span class="f">;</span>
<a name="936" /><span class="Maybe">     936:</span> 
<a name="937" /><span class="Maybe">     937:</span> <span class="m">struct</span> <span class="b">sched_avg</span> <span class="f">{</span>
<a name="938" /><span class="Maybe">     938:</span>     <span class="k">/*</span>
<a name="939" /><span class="Maybe">     939:</span> <span class="k">     * These sums represent an infinite geometric series and so are bound</span>
<a name="940" /><span class="Maybe">     940:</span> <span class="k">     * above by 1024/(1-y).  Thus we only need a u32 to store them for all</span>
<a name="941" /><span class="Maybe">     941:</span> <span class="k">     * choices of y &lt; 1-2^(-32)*1024.</span>
<a name="942" /><span class="Maybe">     942:</span> <span class="k">     */</span>
<a name="943" /><span class="Maybe">     943:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">runnable_avg_sum</span><span class="f">,</span> <span class="b">runnable_avg_period</span><span class="f">;</span>
<a name="944" /><span class="Maybe">     944:</span>     <span class="b">u64</span> <span class="b">last_runnable_update</span><span class="f">;</span>
<a name="945" /><span class="Maybe">     945:</span>     <span class="b">s64</span> <span class="b">decay_count</span><span class="f">;</span>
<a name="946" /><span class="Maybe">     946:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">load_avg_contrib</span><span class="f">;</span>
<a name="947" /><span class="Maybe">     947:</span> <span class="f">}</span><span class="f">;</span>
<a name="948" /><span class="Maybe">     948:</span> 
<a name="949" /><span class="Maybe">     949:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a>
<a name="950" /><span class="Maybe">     950:</span> <span class="m">struct</span> <span class="b">sched_statistics</span> <span class="f">{</span>
<a name="951" /><span class="Maybe">     951:</span>     <span class="b">u64</span>            <span class="b">wait_start</span><span class="f">;</span>
<a name="952" /><span class="Maybe">     952:</span>     <span class="b">u64</span>            <span class="b">wait_max</span><span class="f">;</span>
<a name="953" /><span class="Maybe">     953:</span>     <span class="b">u64</span>            <span class="b">wait_count</span><span class="f">;</span>
<a name="954" /><span class="Maybe">     954:</span>     <span class="b">u64</span>            <span class="b">wait_sum</span><span class="f">;</span>
<a name="955" /><span class="Maybe">     955:</span>     <span class="b">u64</span>            <span class="b">iowait_count</span><span class="f">;</span>
<a name="956" /><span class="Maybe">     956:</span>     <span class="b">u64</span>            <span class="b">iowait_sum</span><span class="f">;</span>
<a name="957" /><span class="Maybe">     957:</span> 
<a name="958" /><span class="Maybe">     958:</span>     <span class="b">u64</span>            <span class="b">sleep_start</span><span class="f">;</span>
<a name="959" /><span class="Maybe">     959:</span>     <span class="b">u64</span>            <span class="b">sleep_max</span><span class="f">;</span>
<a name="960" /><span class="Maybe">     960:</span>     <span class="b">s64</span>            <span class="b">sum_sleep_runtime</span><span class="f">;</span>
<a name="961" /><span class="Maybe">     961:</span> 
<a name="962" /><span class="Maybe">     962:</span>     <span class="b">u64</span>            <span class="b">block_start</span><span class="f">;</span>
<a name="963" /><span class="Maybe">     963:</span>     <span class="b">u64</span>            <span class="b">block_max</span><span class="f">;</span>
<a name="964" /><span class="Maybe">     964:</span>     <span class="b">u64</span>            <span class="b">exec_max</span><span class="f">;</span>
<a name="965" /><span class="Maybe">     965:</span>     <span class="b">u64</span>            <span class="b">slice_max</span><span class="f">;</span>
<a name="966" /><span class="Maybe">     966:</span> 
<a name="967" /><span class="Maybe">     967:</span>     <span class="b">u64</span>            <span class="b">nr_migrations_cold</span><span class="f">;</span>
<a name="968" /><span class="Maybe">     968:</span>     <span class="b">u64</span>            <span class="b">nr_failed_migrations_affine</span><span class="f">;</span>
<a name="969" /><span class="Maybe">     969:</span>     <span class="b">u64</span>            <span class="b">nr_failed_migrations_running</span><span class="f">;</span>
<a name="970" /><span class="Maybe">     970:</span>     <span class="b">u64</span>            <span class="b">nr_failed_migrations_hot</span><span class="f">;</span>
<a name="971" /><span class="Maybe">     971:</span>     <span class="b">u64</span>            <span class="b">nr_forced_migrations</span><span class="f">;</span>
<a name="972" /><span class="Maybe">     972:</span> 
<a name="973" /><span class="Maybe">     973:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups</span><span class="f">;</span>
<a name="974" /><span class="Maybe">     974:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_sync</span><span class="f">;</span>
<a name="975" /><span class="Maybe">     975:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_migrate</span><span class="f">;</span>
<a name="976" /><span class="Maybe">     976:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_local</span><span class="f">;</span>
<a name="977" /><span class="Maybe">     977:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_remote</span><span class="f">;</span>
<a name="978" /><span class="Maybe">     978:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_affine</span><span class="f">;</span>
<a name="979" /><span class="Maybe">     979:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_affine_attempts</span><span class="f">;</span>
<a name="980" /><span class="Maybe">     980:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_passive</span><span class="f">;</span>
<a name="981" /><span class="Maybe">     981:</span>     <span class="b">u64</span>            <span class="b">nr_wakeups_idle</span><span class="f">;</span>
<a name="982" /><span class="Maybe">     982:</span> <span class="f">}</span><span class="f">;</span>
<a name="983" /><span class="Maybe">     983:</span> <span class="f">#</span><span class="n">endif</span>
<a name="984" /><span class="Maybe">     984:</span> 
<a name="985" /><span class="Maybe">     985:</span> <span class="m">struct</span> <span class="b">sched_entity</span> <span class="f">{</span>
<a name="986" /><span class="Maybe">     986:</span>     <span class="m">struct</span> <span class="b">load_weight</span>    <span class="b">load</span><span class="f">;</span>        <span class="k">/* for load-balancing */</span>
<a name="987" /><span class="Maybe">     987:</span>     <span class="m">struct</span> <span class="b">rb_node</span>        <span class="b">run_node</span><span class="f">;</span>
<a name="988" /><span class="Maybe">     988:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">group_node</span><span class="f">;</span>
<a name="989" /><span class="Maybe">     989:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">on_rq</span><span class="f">;</span>
<a name="990" /><span class="Maybe">     990:</span> 
<a name="991" /><span class="Maybe">     991:</span>     <span class="b">u64</span>            <span class="b">exec_start</span><span class="f">;</span>
<a name="992" /><span class="Maybe">     992:</span>     <span class="b">u64</span>            <span class="b">sum_exec_runtime</span><span class="f">;</span>
<a name="993" /><span class="Maybe">     993:</span>     <span class="b">u64</span>            <span class="b">vruntime</span><span class="f">;</span>
<a name="994" /><span class="Maybe">     994:</span>     <span class="b">u64</span>            <span class="b">prev_sum_exec_runtime</span><span class="f">;</span>
<a name="995" /><span class="Maybe">     995:</span> 
<a name="996" /><span class="Maybe">     996:</span>     <span class="b">u64</span>            <span class="b">nr_migrations</span><span class="f">;</span>
<a name="997" /><span class="Maybe">     997:</span> 
<a name="998" /><span class="Maybe">     998:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a>
<a name="999" /><span class="Maybe">     999:</span>     <span class="m">struct</span> <span class="b">sched_statistics</span> <span class="b">statistics</span><span class="f">;</span>
<a name="1000" /><span class="Maybe">    1000:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1001" /><span class="Maybe">    1001:</span> 
<a name="1002" /><span class="Maybe">    1002:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZBSVJfR1JPVVBfU0NIRURfMA__"><span class="b">CONFIG_FAIR_GROUP_SCHED</span></a>
<a name="1003" /><span class="Maybe">    1003:</span>     <span class="m">struct</span> <span class="b">sched_entity</span>    <span class="f">*</span><span class="b">parent</span><span class="f">;</span>
<a name="1004" /><span class="Maybe">    1004:</span>     <span class="k">/* rq on which this entity is (to be) queued: */</span>
<a name="1005" /><span class="Maybe">    1005:</span>     <span class="m">struct</span> <span class="b">cfs_rq</span>        <span class="f">*</span><span class="b">cfs_rq</span><span class="f">;</span>
<a name="1006" /><span class="Maybe">    1006:</span>     <span class="k">/* rq &quot;owned&quot; by this entity/group: */</span>
<a name="1007" /><span class="Maybe">    1007:</span>     <span class="m">struct</span> <span class="b">cfs_rq</span>        <span class="f">*</span><span class="b">my_q</span><span class="f">;</span>
<a name="1008" /><span class="Maybe">    1008:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1009" /><span class="Maybe">    1009:</span> 
<a name="1010" /><span class="Maybe">    1010:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="1011" /><span class="Maybe">    1011:</span>     <span class="k">/* Per-entity load-tracking */</span>
<a name="1012" /><span class="Maybe">    1012:</span>     <span class="m">struct</span> <span class="b">sched_avg</span>    <span class="b">avg</span><span class="f">;</span>
<a name="1013" /><span class="Maybe">    1013:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1014" /><span class="Maybe">    1014:</span> <span class="f">}</span><span class="f">;</span>
<a name="1015" /><span class="Maybe">    1015:</span> 
<a name="1016" /><span class="Maybe">    1016:</span> <span class="m">struct</span> <span class="b">sched_rt_entity</span> <span class="f">{</span>
<a name="1017" /><span class="Maybe">    1017:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">run_list</span><span class="f">;</span>
<a name="1018" /><span class="Maybe">    1018:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">timeout</span><span class="f">;</span>
<a name="1019" /><span class="Maybe">    1019:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">watchdog_stamp</span><span class="f">;</span>
<a name="1020" /><span class="Maybe">    1020:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">time_slice</span><span class="f">;</span>
<a name="1021" /><span class="Maybe">    1021:</span> 
<a name="1022" /><span class="Maybe">    1022:</span>     <span class="m">struct</span> <span class="b">sched_rt_entity</span> <span class="f">*</span><span class="b">back</span><span class="f">;</span>
<a name="1023" /><span class="Maybe">    1023:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1JUX0dST1VQX1NDSEVEXzA_"><span class="b">CONFIG_RT_GROUP_SCHED</span></a>
<a name="1024" /><span class="Maybe">    1024:</span>     <span class="m">struct</span> <span class="b">sched_rt_entity</span>    <span class="f">*</span><span class="b">parent</span><span class="f">;</span>
<a name="1025" /><span class="Maybe">    1025:</span>     <span class="k">/* rq on which this entity is (to be) queued: */</span>
<a name="1026" /><span class="Maybe">    1026:</span>     <span class="m">struct</span> <span class="b">rt_rq</span>        <span class="f">*</span><span class="b">rt_rq</span><span class="f">;</span>
<a name="1027" /><span class="Maybe">    1027:</span>     <span class="k">/* rq &quot;owned&quot; by this entity/group: */</span>
<a name="1028" /><span class="Maybe">    1028:</span>     <span class="m">struct</span> <span class="b">rt_rq</span>        <span class="f">*</span><span class="b">my_q</span><span class="f">;</span>
<a name="1029" /><span class="Maybe">    1029:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1030" /><span class="Maybe">    1030:</span> <span class="f">}</span><span class="f">;</span>
<a name="1031" /><span class="Maybe">    1031:</span> 
<a name="1032" /><span class="Maybe">    1032:</span> 
<a name="1033" /><span class="Maybe">    1033:</span> <span class="m">struct</span> <span class="b">rcu_node</span><span class="f">;</span>
<a name="1034" /><span class="Maybe">    1034:</span> 
<a name="1035" /><span class="Maybe">    1035:</span> <span class="m">enum</span> <span class="b">perf_event_task_context</span> <span class="f">{</span>
<a name="1036" /><span class="Maybe">    1036:</span>     <span class="b">perf_invalid_context</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">,</span>
<a name="1037" /><span class="Maybe">    1037:</span>     <span class="b">perf_hw_context</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>
<a name="1038" /><span class="Maybe">    1038:</span>     <span class="b">perf_sw_context</span><span class="f">,</span>
<a name="1039" /><span class="Maybe">    1039:</span>     <span class="b">perf_nr_task_contexts</span><span class="f">,</span>
<a name="1040" /><span class="Maybe">    1040:</span> <span class="f">}</span><span class="f">;</span>
<a name="1041" /><span class="Maybe">    1041:</span> 
<a name="1042" /><span class="Maybe">    1042:</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">{</span>
<a name="1043" /><span class="Maybe">    1043:</span>     <span class="m">volatile</span> <span class="m">long</span> <span class="b">state</span><span class="f">;</span>    <span class="k">/* -1 unrunnable, 0 runnable, &gt;0 stopped */</span>
<a name="1044" /><span class="Maybe">    1044:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">stack</span><span class="f">;</span>
<a name="1045" /><span class="Maybe">    1045:</span>     <span class="b">atomic_t</span> <span class="b">usage</span><span class="f">;</span>
<a name="1046" /><span class="Maybe">    1046:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">;</span>    <span class="k">/* per process flags, defined below */</span>
<a name="1047" /><span class="Maybe">    1047:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ptrace</span><span class="f">;</span>
<a name="1048" /><span class="Maybe">    1048:</span> 
<a name="1049" /><span class="Maybe">    1049:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="1050" /><span class="Maybe">    1050:</span>     <span class="m">struct</span> <span class="b">llist_node</span> <span class="b">wake_entry</span><span class="f">;</span>
<a name="1051" /><span class="Maybe">    1051:</span>     <span class="m">int</span> <span class="b">on_cpu</span><span class="f">;</span>
<a name="1052" /><span class="Maybe">    1052:</span>     <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">last_wakee</span><span class="f">;</span>
<a name="1053" /><span class="Maybe">    1053:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">wakee_flips</span><span class="f">;</span>
<a name="1054" /><span class="Maybe">    1054:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">wakee_flip_decay_ts</span><span class="f">;</span>
<a name="1055" /><span class="Maybe">    1055:</span> 
<a name="1056" /><span class="Maybe">    1056:</span>     <span class="m">int</span> <span class="b">wake_cpu</span><span class="f">;</span>
<a name="1057" /><span class="Maybe">    1057:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1058" /><span class="Maybe">    1058:</span>     <span class="m">int</span> <span class="b">on_rq</span><span class="f">;</span>
<a name="1059" /><span class="Maybe">    1059:</span> 
<a name="1060" /><span class="Maybe">    1060:</span>     <span class="m">int</span> <span class="b">prio</span><span class="f">,</span> <span class="b">static_prio</span><span class="f">,</span> <span class="b">normal_prio</span><span class="f">;</span>
<a name="1061" /><span class="Maybe">    1061:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">rt_priority</span><span class="f">;</span>
<a name="1062" /><span class="Maybe">    1062:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">sched_class</span> <span class="f">*</span><span class="b">sched_class</span><span class="f">;</span>
<a name="1063" /><span class="Maybe">    1063:</span>     <span class="m">struct</span> <span class="b">sched_entity</span> <span class="b">se</span><span class="f">;</span>
<a name="1064" /><span class="Maybe">    1064:</span>     <span class="m">struct</span> <span class="b">sched_rt_entity</span> <span class="b">rt</span><span class="f">;</span>
<a name="1065" /><span class="Maybe">    1065:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NHUk9VUF9TQ0hFRF8w"><span class="b">CONFIG_CGROUP_SCHED</span></a>
<a name="1066" /><span class="Maybe">    1066:</span>     <span class="m">struct</span> <span class="b">task_group</span> <span class="f">*</span><span class="b">sched_task_group</span><span class="f">;</span>
<a name="1067" /><span class="Maybe">    1067:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1068" /><span class="Maybe">    1068:</span> 
<a name="1069" /><span class="Maybe">    1069:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BSRUVNUFRfTk9USUZJRVJTXzA_"><span class="b">CONFIG_PREEMPT_NOTIFIERS</span></a>
<a name="1070" /><span class="Maybe">    1070:</span>     <span class="k">/* list of struct preempt_notifier: */</span>
<a name="1071" /><span class="Maybe">    1071:</span>     <span class="m">struct</span> <span class="b">hlist_head</span> <span class="b">preempt_notifiers</span><span class="f">;</span>
<a name="1072" /><span class="Maybe">    1072:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1073" /><span class="Maybe">    1073:</span> 
<a name="1074" /><span class="Maybe">    1074:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMS19ERVZfSU9fVFJBQ0VfMA__"><span class="b">CONFIG_BLK_DEV_IO_TRACE</span></a>
<a name="1075" /><span class="Maybe">    1075:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">btrace_seq</span><span class="f">;</span>
<a name="1076" /><span class="Maybe">    1076:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1077" /><span class="Maybe">    1077:</span> 
<a name="1078" /><span class="Maybe">    1078:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">policy</span><span class="f">;</span>
<a name="1079" /><span class="Maybe">    1079:</span>     <span class="m">int</span> <span class="b">nr_cpus_allowed</span><span class="f">;</span>
<a name="1080" /><span class="Maybe">    1080:</span>     <span class="b">cpumask_t</span> <span class="b">cpus_allowed</span><span class="f">;</span>
<a name="1081" /><span class="Maybe">    1081:</span> 
<a name="1082" /><span class="False">    1082:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PREEMPT_RCU</span>
<a name="1083" /><span class="False">    1083:</span>     <span class="m">int</span> <span class="b">rcu_read_lock_nesting</span><span class="f">;</span>
<a name="1084" /><span class="False">    1084:</span>     <span class="m">char</span> <span class="b">rcu_read_unlock_special</span><span class="f">;</span>
<a name="1085" /><span class="False">    1085:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">rcu_node_entry</span><span class="f">;</span>
<a name="1086" /><span class="Maybe">    1086:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_PREEMPT_RCU */</span>
<a name="1087" /><span class="False">    1087:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_TREE_PREEMPT_RCU</span>
<a name="1088" /><span class="False">    1088:</span>     <span class="m">struct</span> <span class="b">rcu_node</span> <span class="f">*</span><span class="b">rcu_blocked_node</span><span class="f">;</span>
<a name="1089" /><span class="Maybe">    1089:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_TREE_PREEMPT_RCU */</span>
<a name="1090" /><span class="False">    1090:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_RCU_BOOST</span>
<a name="1091" /><span class="False">    1091:</span>     <span class="m">struct</span> <span class="b">rt_mutex</span> <span class="f">*</span><span class="b">rcu_boost_mutex</span><span class="f">;</span>
<a name="1092" /><span class="Maybe">    1092:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_RCU_BOOST */</span>
<a name="1093" /><span class="Maybe">    1093:</span> 
<a name="1094" /><span class="Maybe">    1094:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NDSEVEU1RBVFNfMA__"><span class="b">CONFIG_SCHEDSTATS</span></a><span class="f">)</span> <span class="f">||</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfREVMQVlfQUNDVF8w"><span class="b">CONFIG_TASK_DELAY_ACCT</span></a><span class="f">)</span>
<a name="1095" /><span class="Maybe">    1095:</span>     <span class="m">struct</span> <span class="b">sched_info</span> <span class="b">sched_info</span><span class="f">;</span>
<a name="1096" /><span class="Maybe">    1096:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1097" /><span class="Maybe">    1097:</span> 
<a name="1098" /><span class="Maybe">    1098:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">tasks</span><span class="f">;</span>
<a name="1099" /><span class="Maybe">    1099:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="1100" /><span class="Maybe">    1100:</span>     <span class="m">struct</span> <span class="b">plist_node</span> <span class="b">pushable_tasks</span><span class="f">;</span>
<a name="1101" /><span class="Maybe">    1101:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1102" /><span class="Maybe">    1102:</span> 
<a name="1103" /><span class="Maybe">    1103:</span>     <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="f">*</span><span class="b">active_mm</span><span class="f">;</span>
<a name="1104" /><span class="False">    1104:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_COMPAT_BRK</span>
<a name="1105" /><span class="False">    1105:</span>     <span class="m">unsigned</span> <span class="b">brk_randomized</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1106" /><span class="Maybe">    1106:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1107" /><span class="Maybe">    1107:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_U1BMSVRfUlNTX0NPVU5USU5HXzA_"><span class="b">SPLIT_RSS_COUNTING</span></a><span class="f">)</span>
<a name="1108" /><span class="Maybe">    1108:</span>     <span class="m">struct</span> <span class="b">task_rss_stat</span>    <span class="b">rss_stat</span><span class="f">;</span>
<a name="1109" /><span class="Maybe">    1109:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1110" /><span class="Maybe">    1110:</span> <span class="k">/* task state */</span>
<a name="1111" /><span class="Maybe">    1111:</span>     <span class="m">int</span> <span class="b">exit_state</span><span class="f">;</span>
<a name="1112" /><span class="Maybe">    1112:</span>     <span class="m">int</span> <span class="b">exit_code</span><span class="f">,</span> <span class="b">exit_signal</span><span class="f">;</span>
<a name="1113" /><span class="Maybe">    1113:</span>     <span class="m">int</span> <span class="b">pdeath_signal</span><span class="f">;</span>  <span class="k">/*  The signal sent when the parent dies  */</span>
<a name="1114" /><span class="Maybe">    1114:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">jobctl</span><span class="f">;</span>    <span class="k">/* JOBCTL_*, siglock protected */</span>
<a name="1115" /><span class="Maybe">    1115:</span> 
<a name="1116" /><span class="Maybe">    1116:</span>     <span class="k">/* Used for emulating ABI behavior of previous Linux versions */</span>
<a name="1117" /><span class="Maybe">    1117:</span>     <span class="m">unsigned</span> <span class="m">int</span> <a href="cpu.c_macros_noref.html#_cGVyc29uYWxpdHlfMA__"><span class="b">personality</span></a><span class="f">;</span>
<a name="1118" /><span class="Maybe">    1118:</span> 
<a name="1119" /><span class="Maybe">    1119:</span>     <span class="m">unsigned</span> <span class="b">did_exec</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1120" /><span class="Maybe">    1120:</span>     <span class="m">unsigned</span> <span class="b">in_execve</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>    <span class="k">/* Tell the LSMs that the process is doing an</span>
<a name="1121" /><span class="Maybe">    1121:</span> <span class="k">                 * execve */</span>
<a name="1122" /><span class="Maybe">    1122:</span>     <span class="m">unsigned</span> <span class="b">in_iowait</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1123" /><span class="Maybe">    1123:</span> 
<a name="1124" /><span class="Maybe">    1124:</span>     <span class="k">/* task may not gain privileges */</span>
<a name="1125" /><span class="Maybe">    1125:</span>     <span class="m">unsigned</span> <span class="b">no_new_privs</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1126" /><span class="Maybe">    1126:</span> 
<a name="1127" /><span class="Maybe">    1127:</span>     <span class="k">/* Revert to default priority/policy when forking */</span>
<a name="1128" /><span class="Maybe">    1128:</span>     <span class="m">unsigned</span> <span class="b">sched_reset_on_fork</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1129" /><span class="Maybe">    1129:</span>     <span class="m">unsigned</span> <span class="b">sched_contributes_to_load</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1130" /><span class="Maybe">    1130:</span> 
<a name="1131" /><span class="Maybe">    1131:</span>     <span class="b">pid_t</span> <span class="b">pid</span><span class="f">;</span>
<a name="1132" /><span class="Maybe">    1132:</span>     <span class="b">pid_t</span> <span class="b">tgid</span><span class="f">;</span>
<a name="1133" /><span class="Maybe">    1133:</span> 
<a name="1134" /><span class="Maybe">    1134:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NDX1NUQUNLUFJPVEVDVE9SXzA_"><span class="b">CONFIG_CC_STACKPROTECTOR</span></a>
<a name="1135" /><span class="Maybe">    1135:</span>     <span class="k">/* Canary value for the -fstack-protector gcc feature */</span>
<a name="1136" /><span class="Maybe">    1136:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">stack_canary</span><span class="f">;</span>
<a name="1137" /><span class="Maybe">    1137:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1138" /><span class="Maybe">    1138:</span>     <span class="k">/*</span>
<a name="1139" /><span class="Maybe">    1139:</span> <span class="k">     * pointers to (original) parent process, youngest child, younger sibling,</span>
<a name="1140" /><span class="Maybe">    1140:</span> <span class="k">     * older sibling, respectively.  (p-&gt;father can be replaced with</span>
<a name="1141" /><span class="Maybe">    1141:</span> <span class="k">     * p-&gt;real_parent-&gt;pid)</span>
<a name="1142" /><span class="Maybe">    1142:</span> <span class="k">     */</span>
<a name="1143" /><span class="Maybe">    1143:</span>     <span class="m">struct</span> <span class="b">task_struct</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">real_parent</span><span class="f">;</span> <span class="k">/* real parent process */</span>
<a name="1144" /><span class="Maybe">    1144:</span>     <span class="m">struct</span> <span class="b">task_struct</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">parent</span><span class="f">;</span> <span class="k">/* recipient of SIGCHLD, wait4() reports */</span>
<a name="1145" /><span class="Maybe">    1145:</span>     <span class="k">/*</span>
<a name="1146" /><span class="Maybe">    1146:</span> <span class="k">     * children/sibling forms the list of my natural children</span>
<a name="1147" /><span class="Maybe">    1147:</span> <span class="k">     */</span>
<a name="1148" /><span class="Maybe">    1148:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">children</span><span class="f">;</span>    <span class="k">/* list of my children */</span>
<a name="1149" /><span class="Maybe">    1149:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">sibling</span><span class="f">;</span>    <span class="k">/* linkage in my parent&apos;s children list */</span>
<a name="1150" /><span class="Maybe">    1150:</span>     <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">group_leader</span><span class="f">;</span>    <span class="k">/* threadgroup leader */</span>
<a name="1151" /><span class="Maybe">    1151:</span> 
<a name="1152" /><span class="Maybe">    1152:</span>     <span class="k">/*</span>
<a name="1153" /><span class="Maybe">    1153:</span> <span class="k">     * ptraced is the list of tasks this task is using ptrace on.</span>
<a name="1154" /><span class="Maybe">    1154:</span> <span class="k">     * This includes both natural children and PTRACE_ATTACH targets.</span>
<a name="1155" /><span class="Maybe">    1155:</span> <span class="k">     * p-&gt;ptrace_entry is p&apos;s link on the p-&gt;parent-&gt;ptraced list.</span>
<a name="1156" /><span class="Maybe">    1156:</span> <span class="k">     */</span>
<a name="1157" /><span class="Maybe">    1157:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">ptraced</span><span class="f">;</span>
<a name="1158" /><span class="Maybe">    1158:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">ptrace_entry</span><span class="f">;</span>
<a name="1159" /><span class="Maybe">    1159:</span> 
<a name="1160" /><span class="Maybe">    1160:</span>     <span class="k">/* PID/PID hash table linkage. */</span>
<a name="1161" /><span class="Maybe">    1161:</span>     <span class="m">struct</span> <span class="b">pid_link</span> <span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_MAX</span><span class="f">]</span><span class="f">;</span>
<a name="1162" /><span class="Maybe">    1162:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">thread_group</span><span class="f">;</span>
<a name="1163" /><span class="Maybe">    1163:</span> 
<a name="1164" /><span class="Maybe">    1164:</span>     <span class="m">struct</span> <span class="b">completion</span> <span class="f">*</span><span class="b">vfork_done</span><span class="f">;</span>        <span class="k">/* for vfork() */</span>
<a name="1165" /><span class="Maybe">    1165:</span>     <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">set_child_tid</span><span class="f">;</span>        <span class="k">/* CLONE_CHILD_SETTID */</span>
<a name="1166" /><span class="Maybe">    1166:</span>     <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">clear_child_tid</span><span class="f">;</span>        <span class="k">/* CLONE_CHILD_CLEARTID */</span>
<a name="1167" /><span class="Maybe">    1167:</span> 
<a name="1168" /><span class="Maybe">    1168:</span>     <span class="b">cputime_t</span> <span class="b">utime</span><span class="f">,</span> <span class="b">stime</span><span class="f">,</span> <span class="b">utimescaled</span><span class="f">,</span> <span class="b">stimescaled</span><span class="f">;</span>
<a name="1169" /><span class="Maybe">    1169:</span>     <span class="b">cputime_t</span> <span class="b">gtime</span><span class="f">;</span>
<a name="1170" /><span class="Maybe">    1170:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">CONFIG_VIRT_CPU_ACCOUNTING_NATIVE</span>
<a name="1171" /><span class="Maybe">    1171:</span>     <span class="m">struct</span> <span class="b">cputime</span> <span class="b">prev_cputime</span><span class="f">;</span>
<a name="1172" /><span class="Maybe">    1172:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1173" /><span class="False">    1173:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_VIRT_CPU_ACCOUNTING_GEN</span>
<a name="1174" /><span class="False">    1174:</span>     <span class="b">seqlock_t</span> <span class="b">vtime_seqlock</span><span class="f">;</span>
<a name="1175" /><span class="False">    1175:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">vtime_snap</span><span class="f">;</span>
<a name="1176" /><span class="False">    1176:</span>     <span class="m">enum</span> <span class="f">{</span>
<a name="1177" /><span class="False">    1177:</span>         <span class="b">VTIME_SLEEPING</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>
<a name="1178" /><span class="False">    1178:</span>         <span class="b">VTIME_USER</span><span class="f">,</span>
<a name="1179" /><span class="False">    1179:</span>         <span class="b">VTIME_SYS</span><span class="f">,</span>
<a name="1180" /><span class="False">    1180:</span>     <span class="f">}</span> <span class="b">vtime_snap_whence</span><span class="f">;</span>
<a name="1181" /><span class="Maybe">    1181:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1182" /><span class="Maybe">    1182:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nvcsw</span><span class="f">,</span> <span class="b">nivcsw</span><span class="f">;</span> <span class="k">/* context switch counts */</span>
<a name="1183" /><span class="Maybe">    1183:</span>     <span class="m">struct</span> <span class="b">timespec</span> <span class="b">start_time</span><span class="f">;</span>         <span class="k">/* monotonic time */</span>
<a name="1184" /><span class="Maybe">    1184:</span>     <span class="m">struct</span> <span class="b">timespec</span> <span class="b">real_start_time</span><span class="f">;</span>    <span class="k">/* boot based time */</span>
<a name="1185" /><span class="Maybe">    1185:</span> <span class="k">/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */</span>
<a name="1186" /><span class="Maybe">    1186:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">min_flt</span><span class="f">,</span> <span class="b">maj_flt</span><span class="f">;</span>
<a name="1187" /><span class="Maybe">    1187:</span> 
<a name="1188" /><span class="Maybe">    1188:</span>     <span class="m">struct</span> <span class="b">task_cputime</span> <span class="b">cputime_expires</span><span class="f">;</span>
<a name="1189" /><span class="Maybe">    1189:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">cpu_timers</span><span class="f">[</span><span class="c">3</span><span class="f">]</span><span class="f">;</span>
<a name="1190" /><span class="Maybe">    1190:</span> 
<a name="1191" /><span class="Maybe">    1191:</span> <span class="k">/* process credentials */</span>
<a name="1192" /><span class="Maybe">    1192:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">cred</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">real_cred</span><span class="f">;</span> <span class="k">/* objective and real subjective task</span>
<a name="1193" /><span class="Maybe">    1193:</span> <span class="k">                     * credentials (COW) */</span>
<a name="1194" /><span class="Maybe">    1194:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">cred</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">cred</span><span class="f">;</span>    <span class="k">/* effective (overridable) subjective task</span>
<a name="1195" /><span class="Maybe">    1195:</span> <span class="k">                     * credentials (COW) */</span>
<a name="1196" /><span class="Maybe">    1196:</span>     <span class="m">char</span> <span class="b">comm</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_VEFTS19DT01NX0xFTl8w"><span class="b">TASK_COMM_LEN</span></a><span class="f">]</span><span class="f">;</span> <span class="k">/* executable name excluding path</span>
<a name="1197" /><span class="Maybe">    1197:</span> <span class="k">                     - access with [gs]et_task_comm (which lock</span>
<a name="1198" /><span class="Maybe">    1198:</span> <span class="k">                       it with task_lock())</span>
<a name="1199" /><span class="Maybe">    1199:</span> <span class="k">                     - initialized normally by setup_new_exec */</span>
<a name="1200" /><span class="Maybe">    1200:</span> <span class="k">/* file system info */</span>
<a name="1201" /><span class="Maybe">    1201:</span>     <span class="m">int</span> <span class="b">link_count</span><span class="f">,</span> <span class="b">total_link_count</span><span class="f">;</span>
<a name="1202" /><span class="Maybe">    1202:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NZU1ZJUENfMA__"><span class="b">CONFIG_SYSVIPC</span></a>
<a name="1203" /><span class="Maybe">    1203:</span> <span class="k">/* ipc stuff */</span>
<a name="1204" /><span class="Maybe">    1204:</span>     <span class="m">struct</span> <span class="b">sysv_sem</span> <span class="b">sysvsem</span><span class="f">;</span>
<a name="1205" /><span class="Maybe">    1205:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1206" /><span class="Maybe">    1206:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0RFVEVDVF9IVU5HX1RBU0tfMA__"><span class="b">CONFIG_DETECT_HUNG_TASK</span></a>
<a name="1207" /><span class="Maybe">    1207:</span> <span class="k">/* hung task detection */</span>
<a name="1208" /><span class="Maybe">    1208:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">last_switch_count</span><span class="f">;</span>
<a name="1209" /><span class="Maybe">    1209:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1210" /><span class="Maybe">    1210:</span> <span class="k">/* CPU-specific state of this task */</span>
<a name="1211" /><span class="Maybe">    1211:</span>     <span class="m">struct</span> <span class="b">thread_struct</span> <span class="b">thread</span><span class="f">;</span>
<a name="1212" /><span class="Maybe">    1212:</span> <span class="k">/* filesystem information */</span>
<a name="1213" /><span class="Maybe">    1213:</span>     <span class="m">struct</span> <span class="b">fs_struct</span> <span class="f">*</span><span class="b">fs</span><span class="f">;</span>
<a name="1214" /><span class="Maybe">    1214:</span> <span class="k">/* open file information */</span>
<a name="1215" /><span class="Maybe">    1215:</span>     <span class="m">struct</span> <span class="b">files_struct</span> <span class="f">*</span><span class="b">files</span><span class="f">;</span>
<a name="1216" /><span class="Maybe">    1216:</span> <span class="k">/* namespaces */</span>
<a name="1217" /><span class="Maybe">    1217:</span>     <span class="m">struct</span> <span class="b">nsproxy</span> <span class="f">*</span><span class="b">nsproxy</span><span class="f">;</span>
<a name="1218" /><span class="Maybe">    1218:</span> <span class="k">/* signal handlers */</span>
<a name="1219" /><span class="Maybe">    1219:</span>     <span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">signal</span><span class="f">;</span>
<a name="1220" /><span class="Maybe">    1220:</span>     <span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">*</span><span class="b">sighand</span><span class="f">;</span>
<a name="1221" /><span class="Maybe">    1221:</span> 
<a name="1222" /><span class="Maybe">    1222:</span>     <span class="b">sigset_t</span> <span class="b">blocked</span><span class="f">,</span> <span class="b">real_blocked</span><span class="f">;</span>
<a name="1223" /><span class="Maybe">    1223:</span>     <span class="b">sigset_t</span> <span class="b">saved_sigmask</span><span class="f">;</span>    <span class="k">/* restored if set_restore_sigmask() was used */</span>
<a name="1224" /><span class="Maybe">    1224:</span>     <span class="m">struct</span> <span class="b">sigpending</span> <span class="b">pending</span><span class="f">;</span>
<a name="1225" /><span class="Maybe">    1225:</span> 
<a name="1226" /><span class="Maybe">    1226:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">sas_ss_sp</span><span class="f">;</span>
<a name="1227" /><span class="Maybe">    1227:</span>     <span class="b">size_t</span> <span class="b">sas_ss_size</span><span class="f">;</span>
<a name="1228" /><span class="Maybe">    1228:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">notifier</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">priv</span><span class="f">)</span><span class="f">;</span>
<a name="1229" /><span class="Maybe">    1229:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">notifier_data</span><span class="f">;</span>
<a name="1230" /><span class="Maybe">    1230:</span>     <span class="b">sigset_t</span> <span class="f">*</span><span class="b">notifier_mask</span><span class="f">;</span>
<a name="1231" /><span class="Maybe">    1231:</span>     <span class="m">struct</span> <span class="b">callback_head</span> <span class="f">*</span><span class="b">task_works</span><span class="f">;</span>
<a name="1232" /><span class="Maybe">    1232:</span> 
<a name="1233" /><span class="Maybe">    1233:</span>     <span class="m">struct</span> <span class="b">audit_context</span> <span class="f">*</span><span class="b">audit_context</span><span class="f">;</span>
<a name="1234" /><span class="Maybe">    1234:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0FVRElUU1lTQ0FMTF8w"><span class="b">CONFIG_AUDITSYSCALL</span></a>
<a name="1235" /><span class="Maybe">    1235:</span>     <span class="b">kuid_t</span> <span class="b">loginuid</span><span class="f">;</span>
<a name="1236" /><span class="Maybe">    1236:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sessionid</span><span class="f">;</span>
<a name="1237" /><span class="Maybe">    1237:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1238" /><span class="Maybe">    1238:</span>     <span class="m">struct</span> <span class="b">seccomp</span> <span class="b">seccomp</span><span class="f">;</span>
<a name="1239" /><span class="Maybe">    1239:</span> 
<a name="1240" /><span class="Maybe">    1240:</span> <span class="k">/* Thread group tracking */</span>
<a name="1241" /><span class="Maybe">    1241:</span>        <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">parent_exec_id</span><span class="f">;</span>
<a name="1242" /><span class="Maybe">    1242:</span>        <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">self_exec_id</span><span class="f">;</span>
<a name="1243" /><span class="Maybe">    1243:</span> <span class="k">/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,</span>
<a name="1244" /><span class="Maybe">    1244:</span> <span class="k"> * mempolicy */</span>
<a name="1245" /><span class="Maybe">    1245:</span>     <span class="b">spinlock_t</span> <span class="b">alloc_lock</span><span class="f">;</span>
<a name="1246" /><span class="Maybe">    1246:</span> 
<a name="1247" /><span class="Maybe">    1247:</span>     <span class="k">/* Protection of the PI data structures: */</span>
<a name="1248" /><span class="Maybe">    1248:</span>     <span class="b">raw_spinlock_t</span> <span class="b">pi_lock</span><span class="f">;</span>
<a name="1249" /><span class="Maybe">    1249:</span> 
<a name="1250" /><span class="Maybe">    1250:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1JUX01VVEVYRVNfMA__"><span class="b">CONFIG_RT_MUTEXES</span></a>
<a name="1251" /><span class="Maybe">    1251:</span>     <span class="k">/* PI waiters blocked on a rt_mutex held by this task */</span>
<a name="1252" /><span class="Maybe">    1252:</span>     <span class="m">struct</span> <span class="b">plist_head</span> <span class="b">pi_waiters</span><span class="f">;</span>
<a name="1253" /><span class="Maybe">    1253:</span>     <span class="k">/* Deadlock detection and priority inheritance handling */</span>
<a name="1254" /><span class="Maybe">    1254:</span>     <span class="m">struct</span> <span class="b">rt_mutex_waiter</span> <span class="f">*</span><span class="b">pi_blocked_on</span><span class="f">;</span>
<a name="1255" /><span class="Maybe">    1255:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1256" /><span class="Maybe">    1256:</span> 
<a name="1257" /><span class="False">    1257:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_MUTEXES</span>
<a name="1258" /><span class="False">    1258:</span>     <span class="k">/* mutex deadlock detection */</span>
<a name="1259" /><span class="False">    1259:</span>     <span class="m">struct</span> <span class="b">mutex_waiter</span> <span class="f">*</span><span class="b">blocked_on</span><span class="f">;</span>
<a name="1260" /><span class="Maybe">    1260:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1261" /><span class="False">    1261:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_TRACE_IRQFLAGS</span>
<a name="1262" /><span class="False">    1262:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">irq_events</span><span class="f">;</span>
<a name="1263" /><span class="False">    1263:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">hardirq_enable_ip</span><span class="f">;</span>
<a name="1264" /><span class="False">    1264:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">hardirq_disable_ip</span><span class="f">;</span>
<a name="1265" /><span class="False">    1265:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">hardirq_enable_event</span><span class="f">;</span>
<a name="1266" /><span class="False">    1266:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">hardirq_disable_event</span><span class="f">;</span>
<a name="1267" /><span class="False">    1267:</span>     <span class="m">int</span> <span class="b">hardirqs_enabled</span><span class="f">;</span>
<a name="1268" /><span class="False">    1268:</span>     <span class="m">int</span> <span class="b">hardirq_context</span><span class="f">;</span>
<a name="1269" /><span class="False">    1269:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">softirq_disable_ip</span><span class="f">;</span>
<a name="1270" /><span class="False">    1270:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">softirq_enable_ip</span><span class="f">;</span>
<a name="1271" /><span class="False">    1271:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">softirq_disable_event</span><span class="f">;</span>
<a name="1272" /><span class="False">    1272:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">softirq_enable_event</span><span class="f">;</span>
<a name="1273" /><span class="False">    1273:</span>     <span class="m">int</span> <span class="b">softirqs_enabled</span><span class="f">;</span>
<a name="1274" /><span class="False">    1274:</span>     <span class="m">int</span> <span class="b">softirq_context</span><span class="f">;</span>
<a name="1275" /><span class="Maybe">    1275:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1276" /><span class="False">    1276:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCKDEP</span>
<a name="1277" /><span class="False">    1277:</span> <span class="f">#</span> <span class="n">define</span> <span class="b">MAX_LOCK_DEPTH</span> <span class="c">48UL</span>
<a name="1278" /><span class="False">    1278:</span>     <span class="b">u64</span> <span class="b">curr_chain_key</span><span class="f">;</span>
<a name="1279" /><span class="False">    1279:</span>     <span class="m">int</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9kZXB0aF8w"><span class="b">lockdep_depth</span></a><span class="f">;</span>
<a name="1280" /><span class="False">    1280:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">lockdep_recursion</span><span class="f">;</span>
<a name="1281" /><span class="False">    1281:</span>     <span class="m">struct</span> <span class="b">held_lock</span> <span class="b">held_locks</span><span class="f">[</span><span class="b">MAX_LOCK_DEPTH</span><span class="f">]</span><span class="f">;</span>
<a name="1282" /><span class="False">    1282:</span>     <span class="b">gfp_t</span> <span class="b">lockdep_reclaim_gfp</span><span class="f">;</span>
<a name="1283" /><span class="Maybe">    1283:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1284" /><span class="Maybe">    1284:</span> 
<a name="1285" /><span class="Maybe">    1285:</span> <span class="k">/* journalling filesystem info */</span>
<a name="1286" /><span class="Maybe">    1286:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">journal_info</span><span class="f">;</span>
<a name="1287" /><span class="Maybe">    1287:</span> 
<a name="1288" /><span class="Maybe">    1288:</span> <span class="k">/* stacked block device info */</span>
<a name="1289" /><span class="Maybe">    1289:</span>     <span class="m">struct</span> <span class="b">bio_list</span> <span class="f">*</span><span class="b">bio_list</span><span class="f">;</span>
<a name="1290" /><span class="Maybe">    1290:</span> 
<a name="1291" /><span class="Maybe">    1291:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="1292" /><span class="Maybe">    1292:</span> <span class="k">/* stack plugging */</span>
<a name="1293" /><span class="Maybe">    1293:</span>     <span class="m">struct</span> <span class="b">blk_plug</span> <span class="f">*</span><span class="b">plug</span><span class="f">;</span>
<a name="1294" /><span class="Maybe">    1294:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1295" /><span class="Maybe">    1295:</span> 
<a name="1296" /><span class="Maybe">    1296:</span> <span class="k">/* VM state */</span>
<a name="1297" /><span class="Maybe">    1297:</span>     <span class="m">struct</span> <span class="b">reclaim_state</span> <span class="f">*</span><span class="b">reclaim_state</span><span class="f">;</span>
<a name="1298" /><span class="Maybe">    1298:</span> 
<a name="1299" /><span class="Maybe">    1299:</span>     <span class="m">struct</span> <span class="b">backing_dev_info</span> <span class="f">*</span><span class="b">backing_dev_info</span><span class="f">;</span>
<a name="1300" /><span class="Maybe">    1300:</span> 
<a name="1301" /><span class="Maybe">    1301:</span>     <span class="m">struct</span> <span class="b">io_context</span> <span class="f">*</span><span class="b">io_context</span><span class="f">;</span>
<a name="1302" /><span class="Maybe">    1302:</span> 
<a name="1303" /><span class="Maybe">    1303:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ptrace_message</span><span class="f">;</span>
<a name="1304" /><span class="Maybe">    1304:</span>     <span class="b">siginfo_t</span> <span class="f">*</span><span class="b">last_siginfo</span><span class="f">;</span> <span class="k">/* For ptrace use.  */</span>
<a name="1305" /><span class="Maybe">    1305:</span>     <span class="m">struct</span> <span class="b">task_io_accounting</span> <span class="b">ioac</span><span class="f">;</span>
<a name="1306" /><span class="Maybe">    1306:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfWEFDQ1RfMA__"><span class="b">CONFIG_TASK_XACCT</span></a><span class="f">)</span>
<a name="1307" /><span class="Maybe">    1307:</span>     <span class="b">u64</span> <span class="b">acct_rss_mem1</span><span class="f">;</span>    <span class="k">/* accumulated rss usage */</span>
<a name="1308" /><span class="Maybe">    1308:</span>     <span class="b">u64</span> <span class="b">acct_vm_mem1</span><span class="f">;</span>    <span class="k">/* accumulated virtual memory usage */</span>
<a name="1309" /><span class="Maybe">    1309:</span>     <span class="b">cputime_t</span> <span class="b">acct_timexpd</span><span class="f">;</span>    <span class="k">/* stime + utime since last update */</span>
<a name="1310" /><span class="Maybe">    1310:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1311" /><span class="Maybe">    1311:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NQVVNFVFNfMA__"><span class="b">CONFIG_CPUSETS</span></a>
<a name="1312" /><span class="Maybe">    1312:</span>     <span class="b">nodemask_t</span> <span class="b">mems_allowed</span><span class="f">;</span>    <span class="k">/* Protected by alloc_lock */</span>
<a name="1313" /><span class="Maybe">    1313:</span>     <span class="b">seqcount_t</span> <span class="b">mems_allowed_seq</span><span class="f">;</span>    <span class="k">/* Seqence no to catch updates */</span>
<a name="1314" /><span class="Maybe">    1314:</span>     <span class="m">int</span> <span class="b">cpuset_mem_spread_rotor</span><span class="f">;</span>
<a name="1315" /><span class="Maybe">    1315:</span>     <span class="m">int</span> <span class="b">cpuset_slab_spread_rotor</span><span class="f">;</span>
<a name="1316" /><span class="Maybe">    1316:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1317" /><span class="Maybe">    1317:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NHUk9VUFNfMA__"><span class="b">CONFIG_CGROUPS</span></a>
<a name="1318" /><span class="Maybe">    1318:</span>     <span class="k">/* Control Group info protected by css_set_lock */</span>
<a name="1319" /><span class="Maybe">    1319:</span>     <span class="m">struct</span> <span class="b">css_set</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">cgroups</span><span class="f">;</span>
<a name="1320" /><span class="Maybe">    1320:</span>     <span class="k">/* cg_list protected by css_set_lock and tsk-&gt;alloc_lock */</span>
<a name="1321" /><span class="Maybe">    1321:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">cg_list</span><span class="f">;</span>
<a name="1322" /><span class="Maybe">    1322:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1323" /><span class="Maybe">    1323:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZVVEVYXzA_"><span class="b">CONFIG_FUTEX</span></a>
<a name="1324" /><span class="Maybe">    1324:</span>     <span class="m">struct</span> <span class="b">robust_list_head</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">robust_list</span><span class="f">;</span>
<a name="1325" /><span class="Maybe">    1325:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NPTVBBVF8w"><span class="b">CONFIG_COMPAT</span></a>
<a name="1326" /><span class="Maybe">    1326:</span>     <span class="m">struct</span> <span class="b">compat_robust_list_head</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">compat_robust_list</span><span class="f">;</span>
<a name="1327" /><span class="Maybe">    1327:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1328" /><span class="Maybe">    1328:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">pi_state_list</span><span class="f">;</span>
<a name="1329" /><span class="Maybe">    1329:</span>     <span class="m">struct</span> <span class="b">futex_pi_state</span> <span class="f">*</span><span class="b">pi_state_cache</span><span class="f">;</span>
<a name="1330" /><span class="Maybe">    1330:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1331" /><span class="Maybe">    1331:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BFUkZfRVZFTlRTXzA_"><span class="b">CONFIG_PERF_EVENTS</span></a>
<a name="1332" /><span class="Maybe">    1332:</span>     <span class="m">struct</span> <span class="b">perf_event_context</span> <span class="f">*</span><span class="b">perf_event_ctxp</span><span class="f">[</span><span class="b">perf_nr_task_contexts</span><span class="f">]</span><span class="f">;</span>
<a name="1333" /><span class="Maybe">    1333:</span>     <span class="m">struct</span> <span class="b">mutex</span> <span class="b">perf_event_mutex</span><span class="f">;</span>
<a name="1334" /><span class="Maybe">    1334:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">perf_event_list</span><span class="f">;</span>
<a name="1335" /><span class="Maybe">    1335:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1336" /><span class="Maybe">    1336:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX05VTUFfMA__"><span class="b">CONFIG_NUMA</span></a>
<a name="1337" /><span class="Maybe">    1337:</span>     <span class="m">struct</span> <span class="b">mempolicy</span> <span class="f">*</span><span class="b">mempolicy</span><span class="f">;</span>    <span class="k">/* Protected by alloc_lock */</span>
<a name="1338" /><span class="Maybe">    1338:</span>     <span class="m">short</span> <span class="b">il_next</span><span class="f">;</span>
<a name="1339" /><span class="Maybe">    1339:</span>     <span class="m">short</span> <span class="b">pref_node_fork</span><span class="f">;</span>
<a name="1340" /><span class="Maybe">    1340:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1341" /><span class="False">    1341:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_NUMA_BALANCING</span>
<a name="1342" /><span class="False">    1342:</span>     <span class="m">int</span> <span class="b">numa_scan_seq</span><span class="f">;</span>
<a name="1343" /><span class="False">    1343:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">numa_scan_period</span><span class="f">;</span>
<a name="1344" /><span class="False">    1344:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">numa_scan_period_max</span><span class="f">;</span>
<a name="1345" /><span class="False">    1345:</span>     <span class="m">int</span> <span class="b">numa_preferred_nid</span><span class="f">;</span>
<a name="1346" /><span class="False">    1346:</span>     <span class="m">int</span> <span class="b">numa_migrate_deferred</span><span class="f">;</span>
<a name="1347" /><span class="False">    1347:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">numa_migrate_retry</span><span class="f">;</span>
<a name="1348" /><span class="False">    1348:</span>     <span class="b">u64</span> <span class="b">node_stamp</span><span class="f">;</span>            <span class="k">/* migration stamp  */</span>
<a name="1349" /><span class="False">    1349:</span>     <span class="m">struct</span> <span class="b">callback_head</span> <span class="b">numa_work</span><span class="f">;</span>
<a name="1350" /><span class="False">    1350:</span> 
<a name="1351" /><span class="False">    1351:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">numa_entry</span><span class="f">;</span>
<a name="1352" /><span class="False">    1352:</span>     <span class="m">struct</span> <span class="b">numa_group</span> <span class="f">*</span><span class="b">numa_group</span><span class="f">;</span>
<a name="1353" /><span class="False">    1353:</span> 
<a name="1354" /><span class="False">    1354:</span>     <span class="k">/*</span>
<a name="1355" /><span class="False">    1355:</span> <span class="k">     * Exponential decaying average of faults on a per-node basis.</span>
<a name="1356" /><span class="False">    1356:</span> <span class="k">     * Scheduling placement decisions are made based on the these counts.</span>
<a name="1357" /><span class="False">    1357:</span> <span class="k">     * The values remain static for the duration of a PTE scan</span>
<a name="1358" /><span class="False">    1358:</span> <span class="k">     */</span>
<a name="1359" /><span class="False">    1359:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">numa_faults</span><span class="f">;</span>
<a name="1360" /><span class="False">    1360:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">total_numa_faults</span><span class="f">;</span>
<a name="1361" /><span class="False">    1361:</span> 
<a name="1362" /><span class="False">    1362:</span>     <span class="k">/*</span>
<a name="1363" /><span class="False">    1363:</span> <span class="k">     * numa_faults_buffer records faults per node during the current</span>
<a name="1364" /><span class="False">    1364:</span> <span class="k">     * scan window. When the scan completes, the counts in numa_faults</span>
<a name="1365" /><span class="False">    1365:</span> <span class="k">     * decay and these values are copied.</span>
<a name="1366" /><span class="False">    1366:</span> <span class="k">     */</span>
<a name="1367" /><span class="False">    1367:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">numa_faults_buffer</span><span class="f">;</span>
<a name="1368" /><span class="False">    1368:</span> 
<a name="1369" /><span class="False">    1369:</span>     <span class="k">/*</span>
<a name="1370" /><span class="False">    1370:</span> <span class="k">     * numa_faults_locality tracks if faults recorded during the last</span>
<a name="1371" /><span class="False">    1371:</span> <span class="k">     * scan window were remote/local. The task scan period is adapted</span>
<a name="1372" /><span class="False">    1372:</span> <span class="k">     * based on the locality of the faults with different weights</span>
<a name="1373" /><span class="False">    1373:</span> <span class="k">     * depending on whether they were shared or private faults</span>
<a name="1374" /><span class="False">    1374:</span> <span class="k">     */</span>
<a name="1375" /><span class="False">    1375:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">numa_faults_locality</span><span class="f">[</span><span class="c">2</span><span class="f">]</span><span class="f">;</span>
<a name="1376" /><span class="False">    1376:</span> 
<a name="1377" /><span class="False">    1377:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">numa_pages_migrated</span><span class="f">;</span>
<a name="1378" /><span class="Maybe">    1378:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_NUMA_BALANCING */</span>
<a name="1379" /><span class="Maybe">    1379:</span> 
<a name="1380" /><span class="Maybe">    1380:</span>     <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a> <span class="b">rcu</span><span class="f">;</span>
<a name="1381" /><span class="Maybe">    1381:</span> 
<a name="1382" /><span class="Maybe">    1382:</span>     <span class="k">/*</span>
<a name="1383" /><span class="Maybe">    1383:</span> <span class="k">     * cache last used pipe for splice</span>
<a name="1384" /><span class="Maybe">    1384:</span> <span class="k">     */</span>
<a name="1385" /><span class="Maybe">    1385:</span>     <span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="b">splice_pipe</span><span class="f">;</span>
<a name="1386" /><span class="Maybe">    1386:</span> 
<a name="1387" /><span class="Maybe">    1387:</span>     <span class="m">struct</span> <span class="b">page_frag</span> <span class="b">task_frag</span><span class="f">;</span>
<a name="1388" /><span class="Maybe">    1388:</span> 
<a name="1389" /><span class="Maybe">    1389:</span> <span class="f">#</span><span class="n">ifdef</span>    <a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfREVMQVlfQUNDVF8w"><span class="b">CONFIG_TASK_DELAY_ACCT</span></a>
<a name="1390" /><span class="Maybe">    1390:</span>     <span class="m">struct</span> <span class="b">task_delay_info</span> <span class="f">*</span><span class="b">delays</span><span class="f">;</span>
<a name="1391" /><span class="Maybe">    1391:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1392" /><span class="False">    1392:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_FAULT_INJECTION</span>
<a name="1393" /><span class="False">    1393:</span>     <span class="m">int</span> <span class="b">make_it_fail</span><span class="f">;</span>
<a name="1394" /><span class="Maybe">    1394:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1395" /><span class="Maybe">    1395:</span>     <span class="k">/*</span>
<a name="1396" /><span class="Maybe">    1396:</span> <span class="k">     * when (nr_dirtied &gt;= nr_dirtied_pause), it&apos;s time to call</span>
<a name="1397" /><span class="Maybe">    1397:</span> <span class="k">     * balance_dirty_pages() for some dirty throttling pause</span>
<a name="1398" /><span class="Maybe">    1398:</span> <span class="k">     */</span>
<a name="1399" /><span class="Maybe">    1399:</span>     <span class="m">int</span> <span class="b">nr_dirtied</span><span class="f">;</span>
<a name="1400" /><span class="Maybe">    1400:</span>     <span class="m">int</span> <span class="b">nr_dirtied_pause</span><span class="f">;</span>
<a name="1401" /><span class="Maybe">    1401:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">dirty_paused_when</span><span class="f">;</span> <span class="k">/* start of a write-and-pause period */</span>
<a name="1402" /><span class="Maybe">    1402:</span> 
<a name="1403" /><span class="Maybe">    1403:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0xBVEVOQ1lUT1BfMA__"><span class="b">CONFIG_LATENCYTOP</span></a>
<a name="1404" /><span class="Maybe">    1404:</span>     <span class="m">int</span> <span class="b">latency_record_count</span><span class="f">;</span>
<a name="1405" /><span class="Maybe">    1405:</span>     <span class="m">struct</span> <span class="b">latency_record</span> <span class="b">latency_record</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_TFRfU0FWRUNPVU5UXzA_"><span class="b">LT_SAVECOUNT</span></a><span class="f">]</span><span class="f">;</span>
<a name="1406" /><span class="Maybe">    1406:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1407" /><span class="Maybe">    1407:</span>     <span class="k">/*</span>
<a name="1408" /><span class="Maybe">    1408:</span> <span class="k">     * time slack values; these are used to round up poll() and</span>
<a name="1409" /><span class="Maybe">    1409:</span> <span class="k">     * select() etc timeout values. These are in nanoseconds.</span>
<a name="1410" /><span class="Maybe">    1410:</span> <span class="k">     */</span>
<a name="1411" /><span class="Maybe">    1411:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">timer_slack_ns</span><span class="f">;</span>
<a name="1412" /><span class="Maybe">    1412:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">default_timer_slack_ns</span><span class="f">;</span>
<a name="1413" /><span class="Maybe">    1413:</span> 
<a name="1414" /><span class="Maybe">    1414:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZVTkNUSU9OX0dSQVBIX1RSQUNFUl8w"><span class="b">CONFIG_FUNCTION_GRAPH_TRACER</span></a>
<a name="1415" /><span class="Maybe">    1415:</span>     <span class="k">/* Index of current stored address in ret_stack */</span>
<a name="1416" /><span class="Maybe">    1416:</span>     <span class="m">int</span> <span class="b">curr_ret_stack</span><span class="f">;</span>
<a name="1417" /><span class="Maybe">    1417:</span>     <span class="k">/* Stack of return addresses for return function tracing */</span>
<a name="1418" /><span class="Maybe">    1418:</span>     <span class="m">struct</span> <span class="b">ftrace_ret_stack</span>    <span class="f">*</span><span class="b">ret_stack</span><span class="f">;</span>
<a name="1419" /><span class="Maybe">    1419:</span>     <span class="k">/* time stamp for last schedule */</span>
<a name="1420" /><span class="Maybe">    1420:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">ftrace_timestamp</span><span class="f">;</span>
<a name="1421" /><span class="Maybe">    1421:</span>     <span class="k">/*</span>
<a name="1422" /><span class="Maybe">    1422:</span> <span class="k">     * Number of functions that haven&apos;t been traced</span>
<a name="1423" /><span class="Maybe">    1423:</span> <span class="k">     * because of depth overrun.</span>
<a name="1424" /><span class="Maybe">    1424:</span> <span class="k">     */</span>
<a name="1425" /><span class="Maybe">    1425:</span>     <span class="b">atomic_t</span> <span class="b">trace_overrun</span><span class="f">;</span>
<a name="1426" /><span class="Maybe">    1426:</span>     <span class="k">/* Pause for the tracing */</span>
<a name="1427" /><span class="Maybe">    1427:</span>     <span class="b">atomic_t</span> <span class="b">tracing_graph_pause</span><span class="f">;</span>
<a name="1428" /><span class="Maybe">    1428:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1429" /><span class="Maybe">    1429:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1RSQUNJTkdfMA__"><span class="b">CONFIG_TRACING</span></a>
<a name="1430" /><span class="Maybe">    1430:</span>     <span class="k">/* state flags for use by tracers */</span>
<a name="1431" /><span class="Maybe">    1431:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">trace</span><span class="f">;</span>
<a name="1432" /><span class="Maybe">    1432:</span>     <span class="k">/* bitmask and counter of trace recursion */</span>
<a name="1433" /><span class="Maybe">    1433:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">trace_recursion</span><span class="f">;</span>
<a name="1434" /><span class="Maybe">    1434:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_TRACING */</span>
<a name="1435" /><span class="False">    1435:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_MEMCG</span> <span class="k">/* memcg uses this to do batch job */</span>
<a name="1436" /><span class="False">    1436:</span>     <span class="m">struct</span> <span class="b">memcg_batch_info</span> <span class="f">{</span>
<a name="1437" /><span class="False">    1437:</span>         <span class="m">int</span> <span class="b">do_batch</span><span class="f">;</span>    <span class="k">/* incremented when batch uncharge started */</span>
<a name="1438" /><span class="False">    1438:</span>         <span class="m">struct</span> <span class="b">mem_cgroup</span> <span class="f">*</span><span class="b">memcg</span><span class="f">;</span> <span class="k">/* target memcg of uncharge */</span>
<a name="1439" /><span class="False">    1439:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_pages</span><span class="f">;</span>    <span class="k">/* uncharged usage */</span>
<a name="1440" /><span class="False">    1440:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="b">memsw_nr_pages</span><span class="f">;</span> <span class="k">/* uncharged mem+swap usage */</span>
<a name="1441" /><span class="False">    1441:</span>     <span class="f">}</span> <span class="b">memcg_batch</span><span class="f">;</span>
<a name="1442" /><span class="False">    1442:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">memcg_kmem_skip_account</span><span class="f">;</span>
<a name="1443" /><span class="False">    1443:</span>     <span class="m">struct</span> <span class="b">memcg_oom_info</span> <span class="f">{</span>
<a name="1444" /><span class="False">    1444:</span>         <span class="m">struct</span> <span class="b">mem_cgroup</span> <span class="f">*</span><span class="b">memcg</span><span class="f">;</span>
<a name="1445" /><span class="False">    1445:</span>         <span class="b">gfp_t</span> <span class="b">gfp_mask</span><span class="f">;</span>
<a name="1446" /><span class="False">    1446:</span>         <span class="m">int</span> <span class="b">order</span><span class="f">;</span>
<a name="1447" /><span class="False">    1447:</span>         <span class="m">unsigned</span> <span class="m">int</span> <span class="b">may_oom</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="1448" /><span class="False">    1448:</span>     <span class="f">}</span> <span class="b">memcg_oom</span><span class="f">;</span>
<a name="1449" /><span class="Maybe">    1449:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1450" /><span class="False">    1450:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_UPROBES</span>
<a name="1451" /><span class="False">    1451:</span>     <span class="m">struct</span> <span class="b">uprobe_task</span> <span class="f">*</span><span class="b">utask</span><span class="f">;</span>
<a name="1452" /><span class="Maybe">    1452:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1453" /><span class="False">    1453:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_BCACHE</span><span class="f">)</span> <span class="f">||</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_BCACHE_MODULE</span><span class="f">)</span>
<a name="1454" /><span class="False">    1454:</span>     <span class="m">unsigned</span> <span class="m">int</span>    <span class="b">sequential_io</span><span class="f">;</span>
<a name="1455" /><span class="False">    1455:</span>     <span class="m">unsigned</span> <span class="m">int</span>    <span class="b">sequential_io_avg</span><span class="f">;</span>
<a name="1456" /><span class="Maybe">    1456:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1457" /><span class="Maybe">    1457:</span> <span class="f">}</span><span class="f">;</span>
<a name="1458" /><span class="Maybe">    1458:</span> 
<a name="1459" /><span class="Maybe">    1459:</span> <span class="k">/* Future-safe accessor for struct task_struct&apos;s cpus_allowed. */</span>
<a name="1460" /><span class="Maybe">    1460:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dHNrX2NwdXNfYWxsb3dlZF8w"><span class="b">tsk_cpus_allowed</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span> <span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">cpus_allowed</span><span class="f">)</span>
<a name="1461" /><span class="Maybe">    1461:</span> 
<a name="1462" /><span class="Maybe">    1462:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VE5GX01JR1JBVEVEXzA_"><span class="b">TNF_MIGRATED</span></a>    <span class="c">0x01</span>
<a name="1463" /><span class="Maybe">    1463:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VE5GX05PX0dST1VQXzA_"><span class="b">TNF_NO_GROUP</span></a>    <span class="c">0x02</span>
<a name="1464" /><span class="Maybe">    1464:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VE5GX1NIQVJFRF8w"><span class="b">TNF_SHARED</span></a>    <span class="c">0x04</span>
<a name="1465" /><span class="Maybe">    1465:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VE5GX0ZBVUxUX0xPQ0FMXzA_"><span class="b">TNF_FAULT_LOCAL</span></a>    <span class="c">0x08</span>
<a name="1466" /><span class="Maybe">    1466:</span> 
<a name="1467" /><span class="False">    1467:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_NUMA_BALANCING</span>
<a name="1468" /><span class="False">    1468:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_numa_fault</span><span class="f">(</span><span class="m">int</span> <span class="b">last_node</span><span class="f">,</span> <span class="m">int</span> <span class="b">node</span><span class="f">,</span> <span class="m">int</span> <span class="b">pages</span><span class="f">,</span> <span class="m">int</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="1469" /><span class="False">    1469:</span> <span class="m">extern</span> <span class="b">pid_t</span> <span class="b">task_numa_group_id</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1470" /><span class="False">    1470:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_numabalancing_state</span><span class="f">(</span><span class="m">bool</span> <span class="b">enabled</span><span class="f">)</span><span class="f">;</span>
<a name="1471" /><span class="False">    1471:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_numa_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1472" /><span class="False">    1472:</span> 
<a name="1473" /><span class="False">    1473:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">sysctl_numa_balancing_migrate_deferred</span><span class="f">;</span>
<a name="1474" /><span class="Maybe">    1474:</span> <span class="f">#</span><span class="n">else</span>
<a name="1475" /><span class="Maybe">    1475:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_numa_fault</span><span class="f">(</span><span class="m">int</span> <span class="b">last_node</span><span class="f">,</span> <span class="m">int</span> <span class="b">node</span><span class="f">,</span> <span class="m">int</span> <span class="b">pages</span><span class="f">,</span>
<a name="1476" /><span class="Maybe">    1476:</span>                    <span class="m">int</span> <span class="b">flags</span><span class="f">)</span>
<a name="1477" /><span class="Maybe">    1477:</span> <span class="f">{</span>
<a name="1478" /><span class="Maybe">    1478:</span> <span class="f">}</span>
<a name="1479" /><span class="Maybe">    1479:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_numa_group_id</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1480" /><span class="Maybe">    1480:</span> <span class="f">{</span>
<a name="1481" /><span class="Maybe">    1481:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1482" /><span class="Maybe">    1482:</span> <span class="f">}</span>
<a name="1483" /><span class="Maybe">    1483:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_numabalancing_state</span><span class="f">(</span><span class="m">bool</span> <span class="b">enabled</span><span class="f">)</span>
<a name="1484" /><span class="Maybe">    1484:</span> <span class="f">{</span>
<a name="1485" /><span class="Maybe">    1485:</span> <span class="f">}</span>
<a name="1486" /><span class="Maybe">    1486:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_numa_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1487" /><span class="Maybe">    1487:</span> <span class="f">{</span>
<a name="1488" /><span class="Maybe">    1488:</span> <span class="f">}</span>
<a name="1489" /><span class="Maybe">    1489:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1490" /><span class="Maybe">    1490:</span> 
<a name="1491" /><span class="Maybe">    1491:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">task_pid</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span>
<a name="1492" /><span class="Maybe">    1492:</span> <span class="f">{</span>
<a name="1493" /><span class="Maybe">    1493:</span>     <span class="m">return</span> <span class="b">task</span><span class="f">-&gt;</span><span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_PID</span><span class="f">]</span><span class="f">.</span><span class="b">pid</span><span class="f">;</span>
<a name="1494" /><span class="Maybe">    1494:</span> <span class="f">}</span>
<a name="1495" /><span class="Maybe">    1495:</span> 
<a name="1496" /><span class="Maybe">    1496:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">task_tgid</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span>
<a name="1497" /><span class="Maybe">    1497:</span> <span class="f">{</span>
<a name="1498" /><span class="Maybe">    1498:</span>     <span class="m">return</span> <span class="b">task</span><span class="f">-&gt;</span><span class="b">group_leader</span><span class="f">-&gt;</span><span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_PID</span><span class="f">]</span><span class="f">.</span><span class="b">pid</span><span class="f">;</span>
<a name="1499" /><span class="Maybe">    1499:</span> <span class="f">}</span>
<a name="1500" /><span class="Maybe">    1500:</span> 
<a name="1501" /><span class="Maybe">    1501:</span> <span class="k">/*</span>
<a name="1502" /><span class="Maybe">    1502:</span> <span class="k"> * Without tasklist or rcu lock it is not safe to dereference</span>
<a name="1503" /><span class="Maybe">    1503:</span> <span class="k"> * the result of task_pgrp/task_session even if task == current,</span>
<a name="1504" /><span class="Maybe">    1504:</span> <span class="k"> * we can race with another thread doing sys_setsid/sys_setpgid.</span>
<a name="1505" /><span class="Maybe">    1505:</span> <span class="k"> */</span>
<a name="1506" /><span class="Maybe">    1506:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">task_pgrp</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span>
<a name="1507" /><span class="Maybe">    1507:</span> <span class="f">{</span>
<a name="1508" /><span class="Maybe">    1508:</span>     <span class="m">return</span> <span class="b">task</span><span class="f">-&gt;</span><span class="b">group_leader</span><span class="f">-&gt;</span><span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_PGID</span><span class="f">]</span><span class="f">.</span><span class="b">pid</span><span class="f">;</span>
<a name="1509" /><span class="Maybe">    1509:</span> <span class="f">}</span>
<a name="1510" /><span class="Maybe">    1510:</span> 
<a name="1511" /><span class="Maybe">    1511:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">task_session</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span>
<a name="1512" /><span class="Maybe">    1512:</span> <span class="f">{</span>
<a name="1513" /><span class="Maybe">    1513:</span>     <span class="m">return</span> <span class="b">task</span><span class="f">-&gt;</span><span class="b">group_leader</span><span class="f">-&gt;</span><span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_SID</span><span class="f">]</span><span class="f">.</span><span class="b">pid</span><span class="f">;</span>
<a name="1514" /><span class="Maybe">    1514:</span> <span class="f">}</span>
<a name="1515" /><span class="Maybe">    1515:</span> 
<a name="1516" /><span class="Maybe">    1516:</span> <span class="m">struct</span> <span class="b">pid_namespace</span><span class="f">;</span>
<a name="1517" /><span class="Maybe">    1517:</span> 
<a name="1518" /><span class="Maybe">    1518:</span> <span class="k">/*</span>
<a name="1519" /><span class="Maybe">    1519:</span> <span class="k"> * the helpers to get the task&apos;s different pids as they are seen</span>
<a name="1520" /><span class="Maybe">    1520:</span> <span class="k"> * from various namespaces</span>
<a name="1521" /><span class="Maybe">    1521:</span> <span class="k"> *</span>
<a name="1522" /><span class="Maybe">    1522:</span> <span class="k"> * task_xid_nr()     : global id, i.e. the id seen from the init namespace;</span>
<a name="1523" /><span class="Maybe">    1523:</span> <span class="k"> * task_xid_vnr()    : virtual id, i.e. the id seen from the pid namespace of</span>
<a name="1524" /><span class="Maybe">    1524:</span> <span class="k"> *                     current.</span>
<a name="1525" /><span class="Maybe">    1525:</span> <span class="k"> * task_xid_nr_ns()  : id seen from the ns specified;</span>
<a name="1526" /><span class="Maybe">    1526:</span> <span class="k"> *</span>
<a name="1527" /><span class="Maybe">    1527:</span> <span class="k"> * set_task_vxid()   : assigns a virtual id to a task;</span>
<a name="1528" /><span class="Maybe">    1528:</span> <span class="k"> *</span>
<a name="1529" /><span class="Maybe">    1529:</span> <span class="k"> * see also pid_nr() etc in include/linux/pid.h</span>
<a name="1530" /><span class="Maybe">    1530:</span> <span class="k"> */</span>
<a name="1531" /><span class="Maybe">    1531:</span> <span class="b">pid_t</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span> <span class="m">enum</span> <span class="b">pid_type</span> <span class="b">type</span><span class="f">,</span>
<a name="1532" /><span class="Maybe">    1532:</span>             <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="1533" /><span class="Maybe">    1533:</span> 
<a name="1534" /><span class="Maybe">    1534:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pid_nr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1535" /><span class="Maybe">    1535:</span> <span class="f">{</span>
<a name="1536" /><span class="Maybe">    1536:</span>     <span class="m">return</span> <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">pid</span><span class="f">;</span>
<a name="1537" /><span class="Maybe">    1537:</span> <span class="f">}</span>
<a name="1538" /><span class="Maybe">    1538:</span> 
<a name="1539" /><span class="Maybe">    1539:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pid_nr_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="1540" /><span class="Maybe">    1540:</span>                     <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="1541" /><span class="Maybe">    1541:</span> <span class="f">{</span>
<a name="1542" /><span class="Maybe">    1542:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_PID</span><span class="f">,</span> <span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="1543" /><span class="Maybe">    1543:</span> <span class="f">}</span>
<a name="1544" /><span class="Maybe">    1544:</span> 
<a name="1545" /><span class="Maybe">    1545:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pid_vnr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1546" /><span class="Maybe">    1546:</span> <span class="f">{</span>
<a name="1547" /><span class="Maybe">    1547:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_PID</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1548" /><span class="Maybe">    1548:</span> <span class="f">}</span>
<a name="1549" /><span class="Maybe">    1549:</span> 
<a name="1550" /><span class="Maybe">    1550:</span> 
<a name="1551" /><span class="Maybe">    1551:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_tgid_nr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1552" /><span class="Maybe">    1552:</span> <span class="f">{</span>
<a name="1553" /><span class="Maybe">    1553:</span>     <span class="m">return</span> <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">tgid</span><span class="f">;</span>
<a name="1554" /><span class="Maybe">    1554:</span> <span class="f">}</span>
<a name="1555" /><span class="Maybe">    1555:</span> 
<a name="1556" /><span class="Maybe">    1556:</span> <span class="b">pid_t</span> <span class="b">task_tgid_nr_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="1557" /><span class="Maybe">    1557:</span> 
<a name="1558" /><span class="Maybe">    1558:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_tgid_vnr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1559" /><span class="Maybe">    1559:</span> <span class="f">{</span>
<a name="1560" /><span class="Maybe">    1560:</span>     <span class="m">return</span> <span class="b">pid_vnr</span><span class="f">(</span><span class="b">task_tgid</span><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1561" /><span class="Maybe">    1561:</span> <span class="f">}</span>
<a name="1562" /><span class="Maybe">    1562:</span> 
<a name="1563" /><span class="Maybe">    1563:</span> 
<a name="1564" /><span class="Maybe">    1564:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pgrp_nr_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="1565" /><span class="Maybe">    1565:</span>                     <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="1566" /><span class="Maybe">    1566:</span> <span class="f">{</span>
<a name="1567" /><span class="Maybe">    1567:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_PGID</span><span class="f">,</span> <span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="1568" /><span class="Maybe">    1568:</span> <span class="f">}</span>
<a name="1569" /><span class="Maybe">    1569:</span> 
<a name="1570" /><span class="Maybe">    1570:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pgrp_vnr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1571" /><span class="Maybe">    1571:</span> <span class="f">{</span>
<a name="1572" /><span class="Maybe">    1572:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_PGID</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1573" /><span class="Maybe">    1573:</span> <span class="f">}</span>
<a name="1574" /><span class="Maybe">    1574:</span> 
<a name="1575" /><span class="Maybe">    1575:</span> 
<a name="1576" /><span class="Maybe">    1576:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_session_nr_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="1577" /><span class="Maybe">    1577:</span>                     <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="1578" /><span class="Maybe">    1578:</span> <span class="f">{</span>
<a name="1579" /><span class="Maybe">    1579:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_SID</span><span class="f">,</span> <span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="1580" /><span class="Maybe">    1580:</span> <span class="f">}</span>
<a name="1581" /><span class="Maybe">    1581:</span> 
<a name="1582" /><span class="Maybe">    1582:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_session_vnr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1583" /><span class="Maybe">    1583:</span> <span class="f">{</span>
<a name="1584" /><span class="Maybe">    1584:</span>     <span class="m">return</span> <span class="b">__task_pid_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">PIDTYPE_SID</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1585" /><span class="Maybe">    1585:</span> <span class="f">}</span>
<a name="1586" /><span class="Maybe">    1586:</span> 
<a name="1587" /><span class="Maybe">    1587:</span> <span class="k">/* obsolete, do not use */</span>
<a name="1588" /><span class="Maybe">    1588:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pid_t</span> <span class="b">task_pgrp_nr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1589" /><span class="Maybe">    1589:</span> <span class="f">{</span>
<a name="1590" /><span class="Maybe">    1590:</span>     <span class="m">return</span> <span class="b">task_pgrp_nr_ns</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">init_pid_ns</span><span class="f">)</span><span class="f">;</span>
<a name="1591" /><span class="Maybe">    1591:</span> <span class="f">}</span>
<a name="1592" /><span class="Maybe">    1592:</span> 
<a name="1593" /><span class="Maybe">    1593:</span> <span class="k">/**</span>
<a name="1594" /><span class="Maybe">    1594:</span> <span class="k"> * pid_alive - check that a task structure is not stale</span>
<a name="1595" /><span class="Maybe">    1595:</span> <span class="k"> * @p: Task structure to be checked.</span>
<a name="1596" /><span class="Maybe">    1596:</span> <span class="k"> *</span>
<a name="1597" /><span class="Maybe">    1597:</span> <span class="k"> * Test if a process is not yet dead (at most zombie state)</span>
<a name="1598" /><span class="Maybe">    1598:</span> <span class="k"> * If pid_alive fails, then pointers within the task structure</span>
<a name="1599" /><span class="Maybe">    1599:</span> <span class="k"> * can be stale and must not be dereferenced.</span>
<a name="1600" /><span class="Maybe">    1600:</span> <span class="k"> *</span>
<a name="1601" /><span class="Maybe">    1601:</span> <span class="k"> * Return: 1 if the process is alive. 0 otherwise.</span>
<a name="1602" /><span class="Maybe">    1602:</span> <span class="k"> */</span>
<a name="1603" /><span class="Maybe">    1603:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">pid_alive</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1604" /><span class="Maybe">    1604:</span> <span class="f">{</span>
<a name="1605" /><span class="Maybe">    1605:</span>     <span class="m">return</span> <span class="b">p</span><span class="f">-&gt;</span><span class="b">pids</span><span class="f">[</span><span class="b">PIDTYPE_PID</span><span class="f">]</span><span class="f">.</span><span class="b">pid</span> <span class="f">!=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1606" /><span class="Maybe">    1606:</span> <span class="f">}</span>
<a name="1607" /><span class="Maybe">    1607:</span> 
<a name="1608" /><span class="Maybe">    1608:</span> <span class="k">/**</span>
<a name="1609" /><span class="Maybe">    1609:</span> <span class="k"> * is_global_init - check if a task structure is init</span>
<a name="1610" /><span class="Maybe">    1610:</span> <span class="k"> * @tsk: Task structure to be checked.</span>
<a name="1611" /><span class="Maybe">    1611:</span> <span class="k"> *</span>
<a name="1612" /><span class="Maybe">    1612:</span> <span class="k"> * Check if a task structure is the first user space task the kernel created.</span>
<a name="1613" /><span class="Maybe">    1613:</span> <span class="k"> *</span>
<a name="1614" /><span class="Maybe">    1614:</span> <span class="k"> * Return: 1 if the task structure is init. 0 otherwise.</span>
<a name="1615" /><span class="Maybe">    1615:</span> <span class="k"> */</span>
<a name="1616" /><span class="Maybe">    1616:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">is_global_init</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="1617" /><span class="Maybe">    1617:</span> <span class="f">{</span>
<a name="1618" /><span class="Maybe">    1618:</span>     <span class="m">return</span> <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">pid</span> <span class="f">==</span> <span class="c">1</span><span class="f">;</span>
<a name="1619" /><span class="Maybe">    1619:</span> <span class="f">}</span>
<a name="1620" /><span class="Maybe">    1620:</span> 
<a name="1621" /><span class="Maybe">    1621:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">cad_pid</span><span class="f">;</span>
<a name="1622" /><span class="Maybe">    1622:</span> 
<a name="1623" /><span class="Maybe">    1623:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">free_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="1624" /><span class="Maybe">    1624:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Z2V0X3Rhc2tfc3RydWN0XzA_"><span class="b">get_task_struct</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="b">atomic_inc</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">usage</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span><span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1625" /><span class="Maybe">    1625:</span> 
<a name="1626" /><span class="Maybe">    1626:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__put_task_struct</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span><span class="f">;</span>
<a name="1627" /><span class="Maybe">    1627:</span> 
<a name="1628" /><span class="Maybe">    1628:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">put_task_struct</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span>
<a name="1629" /><span class="Maybe">    1629:</span> <span class="f">{</span>
<a name="1630" /><span class="Maybe">    1630:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">atomic_dec_and_test</span><span class="f">(</span><span class="f">&amp;</span><span class="b">t</span><span class="f">-&gt;</span><span class="b">usage</span><span class="f">)</span><span class="f">)</span>
<a name="1631" /><span class="Maybe">    1631:</span>         <span class="b">__put_task_struct</span><span class="f">(</span><span class="b">t</span><span class="f">)</span><span class="f">;</span>
<a name="1632" /><span class="Maybe">    1632:</span> <span class="f">}</span>
<a name="1633" /><span class="Maybe">    1633:</span> 
<a name="1634" /><span class="False">    1634:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_VIRT_CPU_ACCOUNTING_GEN</span>
<a name="1635" /><span class="False">    1635:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_cputime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="1636" /><span class="False">    1636:</span>              <span class="b">cputime_t</span> <span class="f">*</span><span class="b">utime</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">stime</span><span class="f">)</span><span class="f">;</span>
<a name="1637" /><span class="False">    1637:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_cputime_scaled</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="1638" /><span class="False">    1638:</span>                 <span class="b">cputime_t</span> <span class="f">*</span><span class="b">utimescaled</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">stimescaled</span><span class="f">)</span><span class="f">;</span>
<a name="1639" /><span class="False">    1639:</span> <span class="m">extern</span> <span class="b">cputime_t</span> <span class="b">task_gtime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span><span class="f">;</span>
<a name="1640" /><span class="Maybe">    1640:</span> <span class="f">#</span><span class="n">else</span>
<a name="1641" /><span class="Maybe">    1641:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_cputime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="1642" /><span class="Maybe">    1642:</span>                 <span class="b">cputime_t</span> <span class="f">*</span><span class="b">utime</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">stime</span><span class="f">)</span>
<a name="1643" /><span class="Maybe">    1643:</span> <span class="f">{</span>
<a name="1644" /><span class="Maybe">    1644:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">utime</span><span class="f">)</span>
<a name="1645" /><span class="Maybe">    1645:</span>         <span class="f">*</span><span class="b">utime</span> <span class="f">=</span> <span class="b">t</span><span class="f">-&gt;</span><span class="b">utime</span><span class="f">;</span>
<a name="1646" /><span class="Maybe">    1646:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">stime</span><span class="f">)</span>
<a name="1647" /><span class="Maybe">    1647:</span>         <span class="f">*</span><span class="b">stime</span> <span class="f">=</span> <span class="b">t</span><span class="f">-&gt;</span><span class="b">stime</span><span class="f">;</span>
<a name="1648" /><span class="Maybe">    1648:</span> <span class="f">}</span>
<a name="1649" /><span class="Maybe">    1649:</span> 
<a name="1650" /><span class="Maybe">    1650:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_cputime_scaled</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="1651" /><span class="Maybe">    1651:</span>                        <span class="b">cputime_t</span> <span class="f">*</span><span class="b">utimescaled</span><span class="f">,</span>
<a name="1652" /><span class="Maybe">    1652:</span>                        <span class="b">cputime_t</span> <span class="f">*</span><span class="b">stimescaled</span><span class="f">)</span>
<a name="1653" /><span class="Maybe">    1653:</span> <span class="f">{</span>
<a name="1654" /><span class="Maybe">    1654:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">utimescaled</span><span class="f">)</span>
<a name="1655" /><span class="Maybe">    1655:</span>         <span class="f">*</span><span class="b">utimescaled</span> <span class="f">=</span> <span class="b">t</span><span class="f">-&gt;</span><span class="b">utimescaled</span><span class="f">;</span>
<a name="1656" /><span class="Maybe">    1656:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">stimescaled</span><span class="f">)</span>
<a name="1657" /><span class="Maybe">    1657:</span>         <span class="f">*</span><span class="b">stimescaled</span> <span class="f">=</span> <span class="b">t</span><span class="f">-&gt;</span><span class="b">stimescaled</span><span class="f">;</span>
<a name="1658" /><span class="Maybe">    1658:</span> <span class="f">}</span>
<a name="1659" /><span class="Maybe">    1659:</span> 
<a name="1660" /><span class="Maybe">    1660:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">cputime_t</span> <span class="b">task_gtime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span>
<a name="1661" /><span class="Maybe">    1661:</span> <span class="f">{</span>
<a name="1662" /><span class="Maybe">    1662:</span>     <span class="m">return</span> <span class="b">t</span><span class="f">-&gt;</span><span class="b">gtime</span><span class="f">;</span>
<a name="1663" /><span class="Maybe">    1663:</span> <span class="f">}</span>
<a name="1664" /><span class="Maybe">    1664:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1665" /><span class="Maybe">    1665:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_cputime_adjusted</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">ut</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">st</span><span class="f">)</span><span class="f">;</span>
<a name="1666" /><span class="Maybe">    1666:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">thread_group_cputime_adjusted</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">ut</span><span class="f">,</span> <span class="b">cputime_t</span> <span class="f">*</span><span class="b">st</span><span class="f">)</span><span class="f">;</span>
<a name="1667" /><span class="Maybe">    1667:</span> 
<a name="1668" /><span class="Maybe">    1668:</span> <span class="k">/*</span>
<a name="1669" /><span class="Maybe">    1669:</span> <span class="k"> * Per process flags</span>
<a name="1670" /><span class="Maybe">    1670:</span> <span class="k"> */</span>
<a name="1671" /><span class="Maybe">    1671:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfRVhJVElOR18w"><span class="b">PF_EXITING</span></a>    <span class="c">0x00000004</span>    <span class="k">/* getting shut down */</span>
<a name="1672" /><span class="Maybe">    1672:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfRVhJVFBJRE9ORV8w"><span class="b">PF_EXITPIDONE</span></a>    <span class="c">0x00000008</span>    <span class="k">/* pi exit done on shut down */</span>
<a name="1673" /><span class="Maybe">    1673:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfVkNQVV8w"><span class="b">PF_VCPU</span></a>        <span class="c">0x00000010</span>    <span class="k">/* I&apos;m a virtual CPU */</span>
<a name="1674" /><span class="Maybe">    1674:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfV1FfV09SS0VSXzA_"><span class="b">PF_WQ_WORKER</span></a>    <span class="c">0x00000020</span>    <span class="k">/* I&apos;m a workqueue worker */</span>
<a name="1675" /><span class="Maybe">    1675:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfRk9SS05PRVhFQ18w"><span class="b">PF_FORKNOEXEC</span></a>    <span class="c">0x00000040</span>    <span class="k">/* forked but didn&apos;t exec */</span>
<a name="1676" /><span class="Maybe">    1676:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTUNFX1BST0NFU1NfMA__"><span class="b">PF_MCE_PROCESS</span></a>  <span class="c">0x00000080</span>      <span class="k">/* process policy on mce errors */</span>
<a name="1677" /><span class="Maybe">    1677:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU1VQRVJQUklWXzA_"><span class="b">PF_SUPERPRIV</span></a>    <span class="c">0x00000100</span>    <span class="k">/* used super-user privileges */</span>
<a name="1678" /><span class="Maybe">    1678:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfRFVNUENPUkVfMA__"><span class="b">PF_DUMPCORE</span></a>    <span class="c">0x00000200</span>    <span class="k">/* dumped core */</span>
<a name="1679" /><span class="Maybe">    1679:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU0lHTkFMRURfMA__"><span class="b">PF_SIGNALED</span></a>    <span class="c">0x00000400</span>    <span class="k">/* killed by a signal */</span>
<a name="1680" /><span class="Maybe">    1680:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTUVNQUxMT0NfMA__"><span class="b">PF_MEMALLOC</span></a>    <span class="c">0x00000800</span>    <span class="k">/* Allocating memory */</span>
<a name="1681" /><span class="Maybe">    1681:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTlBST0NfRVhDRUVERURfMA__"><span class="b">PF_NPROC_EXCEEDED</span></a> <span class="c">0x00001000</span>    <span class="k">/* set_user noticed that RLIMIT_NPROC was exceeded */</span>
<a name="1682" /><span class="Maybe">    1682:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a>    <span class="c">0x00002000</span>    <span class="k">/* if unset the fpu must be initialized before use */</span>
<a name="1683" /><span class="Maybe">    1683:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9BU1lOQ18w"><span class="b">PF_USED_ASYNC</span></a>    <span class="c">0x00004000</span>    <span class="k">/* used async_schedule*(), used by module init */</span>
<a name="1684" /><span class="Maybe">    1684:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UEZfTk9GUkVFWkVfMA__"><span class="b">PF_NOFREEZE</span></a>    <span class="c">0x00008000</span>    <span class="k">/* this thread should not be frozen */</span>
<a name="1685" /><span class="Maybe">    1685:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UEZfRlJPWkVOXzA_"><span class="b">PF_FROZEN</span></a>    <span class="c">0x00010000</span>    <span class="k">/* frozen for system suspend */</span>
<a name="1686" /><span class="Maybe">    1686:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfRlNUUkFOU18w"><span class="b">PF_FSTRANS</span></a>    <span class="c">0x00020000</span>    <span class="k">/* inside a filesystem transaction */</span>
<a name="1687" /><span class="Maybe">    1687:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UEZfS1NXQVBEXzA_"><span class="b">PF_KSWAPD</span></a>    <span class="c">0x00040000</span>    <span class="k">/* I am kswapd */</span>
<a name="1688" /><span class="Maybe">    1688:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UEZfTUVNQUxMT0NfTk9JT18w"><span class="b">PF_MEMALLOC_NOIO</span></a> <span class="c">0x00080000</span>    <span class="k">/* Allocating memory without IO involved */</span>
<a name="1689" /><span class="Maybe">    1689:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTEVTU19USFJPVFRMRV8w"><span class="b">PF_LESS_THROTTLE</span></a> <span class="c">0x00100000</span>    <span class="k">/* Throttle me less: I clean memory */</span>
<a name="1690" /><span class="Maybe">    1690:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfS1RIUkVBRF8w"><span class="b">PF_KTHREAD</span></a>    <span class="c">0x00200000</span>    <span class="k">/* I am a kernel thread */</span>
<a name="1691" /><span class="Maybe">    1691:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfUkFORE9NSVpFXzA_"><span class="b">PF_RANDOMIZE</span></a>    <span class="c">0x00400000</span>    <span class="k">/* randomize virtual address space */</span>
<a name="1692" /><span class="Maybe">    1692:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU1dBUFdSSVRFXzA_"><span class="b">PF_SWAPWRITE</span></a>    <span class="c">0x00800000</span>    <span class="k">/* Allowed to write to swap */</span>
<a name="1693" /><span class="Maybe">    1693:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU1BSRUFEX1BBR0VfMA__"><span class="b">PF_SPREAD_PAGE</span></a>    <span class="c">0x01000000</span>    <span class="k">/* Spread page cache over cpuset */</span>
<a name="1694" /><span class="Maybe">    1694:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU1BSRUFEX1NMQUJfMA__"><span class="b">PF_SPREAD_SLAB</span></a>    <span class="c">0x02000000</span>    <span class="k">/* Spread some slab caches over cpuset */</span>
<a name="1695" /><span class="Maybe">    1695:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTk9fU0VUQUZGSU5JVFlfMA__"><span class="b">PF_NO_SETAFFINITY</span></a> <span class="c">0x04000000</span>    <span class="k">/* Userland is not allowed to meddle with cpus_allowed */</span>
<a name="1696" /><span class="Maybe">    1696:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTUNFX0VBUkxZXzA_"><span class="b">PF_MCE_EARLY</span></a>    <span class="c">0x08000000</span>      <span class="k">/* Early kill for mce process policy */</span>
<a name="1697" /><span class="Maybe">    1697:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTUVNUE9MSUNZXzA_"><span class="b">PF_MEMPOLICY</span></a>    <span class="c">0x10000000</span>    <span class="k">/* Non-default NUMA mempolicy */</span>
<a name="1698" /><span class="Maybe">    1698:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfTVVURVhfVEVTVEVSXzA_"><span class="b">PF_MUTEX_TESTER</span></a>    <span class="c">0x20000000</span>    <span class="k">/* Thread belongs to the rt mutex tester */</span>
<a name="1699" /><span class="Maybe">    1699:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UEZfRlJFRVpFUl9TS0lQXzA_"><span class="b">PF_FREEZER_SKIP</span></a>    <span class="c">0x40000000</span>    <span class="k">/* Freezer should not count it as freezable */</span>
<a name="1700" /><span class="Maybe">    1700:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEZfU1VTUEVORF9UQVNLXzA_"><span class="b">PF_SUSPEND_TASK</span></a> <span class="c">0x80000000</span>      <span class="k">/* this thread called freeze_processes and should not be frozen */</span>
<a name="1701" /><span class="Maybe">    1701:</span> 
<a name="1702" /><span class="Maybe">    1702:</span> <span class="k">/*</span>
<a name="1703" /><span class="Maybe">    1703:</span> <span class="k"> * Only the _current_ task can read/write to tsk-&gt;flags, but other</span>
<a name="1704" /><span class="Maybe">    1704:</span> <span class="k"> * tasks can access tsk-&gt;flags in readonly mode for example</span>
<a name="1705" /><span class="Maybe">    1705:</span> <span class="k"> * with tsk_used_math (like during threaded core dumping).</span>
<a name="1706" /><span class="Maybe">    1706:</span> <span class="k"> * There is however an exception to this rule during ptrace</span>
<a name="1707" /><span class="Maybe">    1707:</span> <span class="k"> * or during fork: the ptracer task is allowed to write to the</span>
<a name="1708" /><span class="Maybe">    1708:</span> <span class="k"> * child-&gt;flags of its traced child (same goes for fork, the parent</span>
<a name="1709" /><span class="Maybe">    1709:</span> <span class="k"> * can write to the child-&gt;flags), because we&apos;re guaranteed the</span>
<a name="1710" /><span class="Maybe">    1710:</span> <span class="k"> * child is not running and in turn not changing child-&gt;flags</span>
<a name="1711" /><span class="Maybe">    1711:</span> <span class="k"> * at the same time the parent does it.</span>
<a name="1712" /><span class="Maybe">    1712:</span> <span class="k"> */</span>
<a name="1713" /><span class="Maybe">    1713:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y2xlYXJfc3RvcHBlZF9jaGlsZF91c2VkX21hdGhfMA__"><span class="b">clear_stopped_child_used_math</span></a><span class="f">(</span><span class="b">child</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1714" /><span class="Maybe">    1714:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2V0X3N0b3BwZWRfY2hpbGRfdXNlZF9tYXRoXzA_"><span class="b">set_stopped_child_used_math</span></a><span class="f">(</span><span class="b">child</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1715" /><span class="Maybe">    1715:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y2xlYXJfdXNlZF9tYXRoXzA_"><span class="b">clear_used_math</span></a><span class="f">(</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_Y2xlYXJfc3RvcHBlZF9jaGlsZF91c2VkX21hdGhfMA__"><span class="b">clear_stopped_child_used_math</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">)</span>
<a name="1716" /><span class="Maybe">    1716:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2V0X3VzZWRfbWF0aF8w"><span class="b">set_used_math</span></a><span class="f">(</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_c2V0X3N0b3BwZWRfY2hpbGRfdXNlZF9tYXRoXzA_"><span class="b">set_stopped_child_used_math</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">)</span>
<a name="1717" /><span class="Maybe">    1717:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y29uZGl0aW9uYWxfc3RvcHBlZF9jaGlsZF91c2VkX21hdGhfMA__"><span class="b">conditional_stopped_child_used_math</span></a><span class="f">(</span><span class="b">condition</span><span class="f">,</span> <span class="b">child</span><span class="f">)</span> \
<a name="1718" /><span class="Maybe">    1718:</span>     <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">,</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <span class="f">(</span><span class="b">condition</span><span class="f">)</span> <span class="f">?</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a> <span class="f">:</span> <span class="c">0</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1719" /><span class="Maybe">    1719:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y29uZGl0aW9uYWxfdXNlZF9tYXRoXzA_"><span class="b">conditional_used_math</span></a><span class="f">(</span><span class="b">condition</span><span class="f">)</span> \
<a name="1720" /><span class="Maybe">    1720:</span>     <a href="cpu.c_macros_noref.html#_Y29uZGl0aW9uYWxfc3RvcHBlZF9jaGlsZF91c2VkX21hdGhfMA__"><span class="b">conditional_stopped_child_used_math</span></a><span class="f">(</span><span class="b">condition</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">)</span>
<a name="1721" /><span class="Maybe">    1721:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y29weV90b19zdG9wcGVkX2NoaWxkX3VzZWRfbWF0aF8w"><span class="b">copy_to_stopped_child_used_math</span></a><span class="f">(</span><span class="b">child</span><span class="f">)</span> \
<a name="1722" /><span class="Maybe">    1722:</span>     <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">,</span> <span class="f">(</span><span class="b">child</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1723" /><span class="Maybe">    1723:</span> <span class="k">/* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */</span>
<a name="1724" /><span class="Maybe">    1724:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dHNrX3VzZWRfbWF0aF8w"><span class="b">tsk_used_math</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_UEZfVVNFRF9NQVRIXzA_"><span class="b">PF_USED_MATH</span></a><span class="f">)</span>
<a name="1725" /><span class="Maybe">    1725:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_dXNlZF9tYXRoXzA_"><span class="b">used_math</span></a><span class="f">(</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_dHNrX3VzZWRfbWF0aF8w"><span class="b">tsk_used_math</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">)</span>
<a name="1726" /><span class="Maybe">    1726:</span> 
<a name="1727" /><span class="Maybe">    1727:</span> <span class="k">/* __GFP_IO isn&apos;t allowed if PF_MEMALLOC_NOIO is set in current-&gt;flags */</span>
<a name="1728" /><span class="Maybe">    1728:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">gfp_t</span> <span class="b">memalloc_noio_flags</span><span class="f">(</span><span class="b">gfp_t</span> <span class="b">flags</span><span class="f">)</span>
<a name="1729" /><span class="Maybe">    1729:</span> <span class="f">{</span>
<a name="1730" /><span class="Maybe">    1730:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_UEZfTUVNQUxMT0NfTk9JT18w"><span class="b">PF_MEMALLOC_NOIO</span></a><span class="f">)</span><span class="f">)</span>
<a name="1731" /><span class="Maybe">    1731:</span>         <span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_X19HRlBfSU9fMA__"><span class="b">__GFP_IO</span></a><span class="f">;</span>
<a name="1732" /><span class="Maybe">    1732:</span>     <span class="m">return</span> <span class="b">flags</span><span class="f">;</span>
<a name="1733" /><span class="Maybe">    1733:</span> <span class="f">}</span>
<a name="1734" /><span class="Maybe">    1734:</span> 
<a name="1735" /><span class="Maybe">    1735:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">memalloc_noio_save</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="1736" /><span class="Maybe">    1736:</span> <span class="f">{</span>
<a name="1737" /><span class="Maybe">    1737:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_UEZfTUVNQUxMT0NfTk9JT18w"><span class="b">PF_MEMALLOC_NOIO</span></a><span class="f">;</span>
<a name="1738" /><span class="Maybe">    1738:</span>     <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_UEZfTUVNQUxMT0NfTk9JT18w"><span class="b">PF_MEMALLOC_NOIO</span></a><span class="f">;</span>
<a name="1739" /><span class="Maybe">    1739:</span>     <span class="m">return</span> <span class="b">flags</span><span class="f">;</span>
<a name="1740" /><span class="Maybe">    1740:</span> <span class="f">}</span>
<a name="1741" /><span class="Maybe">    1741:</span> 
<a name="1742" /><span class="Maybe">    1742:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">memalloc_noio_restore</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">)</span>
<a name="1743" /><span class="Maybe">    1743:</span> <span class="f">{</span>
<a name="1744" /><span class="Maybe">    1744:</span>     <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_UEZfTUVNQUxMT0NfTk9JT18w"><span class="b">PF_MEMALLOC_NOIO</span></a><span class="f">)</span> <span class="f">|</span> <span class="b">flags</span><span class="f">;</span>
<a name="1745" /><span class="Maybe">    1745:</span> <span class="f">}</span>
<a name="1746" /><span class="Maybe">    1746:</span> 
<a name="1747" /><span class="Maybe">    1747:</span> <span class="k">/*</span>
<a name="1748" /><span class="Maybe">    1748:</span> <span class="k"> * task-&gt;jobctl flags</span>
<a name="1749" /><span class="Maybe">    1749:</span> <span class="k"> */</span>
<a name="1750" /><span class="Maybe">    1750:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfU0lHTUFTS18w"><span class="b">JOBCTL_STOP_SIGMASK</span></a>    <span class="c">0xffff</span>    <span class="k">/* signr of the last group stop */</span>
<a name="1751" /><span class="Maybe">    1751:</span> 
<a name="1752" /><span class="Maybe">    1752:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfREVRVUVVRURfQklUXzA_"><span class="b">JOBCTL_STOP_DEQUEUED_BIT</span></a> <span class="c">16</span>    <span class="k">/* stop signal dequeued */</span>
<a name="1753" /><span class="Maybe">    1753:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfUEVORElOR19CSVRfMA__"><span class="b">JOBCTL_STOP_PENDING_BIT</span></a>    <span class="c">17</span>    <span class="k">/* task should stop for group stop */</span>
<a name="1754" /><span class="Maybe">    1754:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfQ09OU1VNRV9CSVRfMA__"><span class="b">JOBCTL_STOP_CONSUME_BIT</span></a>    <span class="c">18</span>    <span class="k">/* consume group stop count */</span>
<a name="1755" /><span class="Maybe">    1755:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfU1RPUF9CSVRfMA__"><span class="b">JOBCTL_TRAP_STOP_BIT</span></a>    <span class="c">19</span>    <span class="k">/* trap for STOP */</span>
<a name="1756" /><span class="Maybe">    1756:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTk9USUZZX0JJVF8w"><span class="b">JOBCTL_TRAP_NOTIFY_BIT</span></a>    <span class="c">20</span>    <span class="k">/* trap for NOTIFY */</span>
<a name="1757" /><span class="Maybe">    1757:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBQSU5HX0JJVF8w"><span class="b">JOBCTL_TRAPPING_BIT</span></a>    <span class="c">21</span>    <span class="k">/* switching to TRACED */</span>
<a name="1758" /><span class="Maybe">    1758:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX0xJU1RFTklOR19CSVRfMA__"><span class="b">JOBCTL_LISTENING_BIT</span></a>    <span class="c">22</span>    <span class="k">/* ptracer is listening for events */</span>
<a name="1759" /><span class="Maybe">    1759:</span> 
<a name="1760" /><span class="Maybe">    1760:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfREVRVUVVRURfMA__"><span class="b">JOBCTL_STOP_DEQUEUED</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfREVRVUVVRURfQklUXzA_"><span class="b">JOBCTL_STOP_DEQUEUED_BIT</span></a><span class="f">)</span>
<a name="1761" /><span class="Maybe">    1761:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfUEVORElOR18w"><span class="b">JOBCTL_STOP_PENDING</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfUEVORElOR19CSVRfMA__"><span class="b">JOBCTL_STOP_PENDING_BIT</span></a><span class="f">)</span>
<a name="1762" /><span class="Maybe">    1762:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfQ09OU1VNRV8w"><span class="b">JOBCTL_STOP_CONSUME</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfQ09OU1VNRV9CSVRfMA__"><span class="b">JOBCTL_STOP_CONSUME_BIT</span></a><span class="f">)</span>
<a name="1763" /><span class="Maybe">    1763:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfU1RPUF8w"><span class="b">JOBCTL_TRAP_STOP</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfU1RPUF9CSVRfMA__"><span class="b">JOBCTL_TRAP_STOP_BIT</span></a><span class="f">)</span>
<a name="1764" /><span class="Maybe">    1764:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTk9USUZZXzA_"><span class="b">JOBCTL_TRAP_NOTIFY</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTk9USUZZX0JJVF8w"><span class="b">JOBCTL_TRAP_NOTIFY_BIT</span></a><span class="f">)</span>
<a name="1765" /><span class="Maybe">    1765:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBQSU5HXzA_"><span class="b">JOBCTL_TRAPPING</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBQSU5HX0JJVF8w"><span class="b">JOBCTL_TRAPPING_BIT</span></a><span class="f">)</span>
<a name="1766" /><span class="Maybe">    1766:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX0xJU1RFTklOR18w"><span class="b">JOBCTL_LISTENING</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX0xJU1RFTklOR19CSVRfMA__"><span class="b">JOBCTL_LISTENING_BIT</span></a><span class="f">)</span>
<a name="1767" /><span class="Maybe">    1767:</span> 
<a name="1768" /><span class="Maybe">    1768:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTUFTS18w"><span class="b">JOBCTL_TRAP_MASK</span></a>    <span class="f">(</span><a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfU1RPUF8w"><span class="b">JOBCTL_TRAP_STOP</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTk9USUZZXzA_"><span class="b">JOBCTL_TRAP_NOTIFY</span></a><span class="f">)</span>
<a name="1769" /><span class="Maybe">    1769:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1BFTkRJTkdfTUFTS18w"><span class="b">JOBCTL_PENDING_MASK</span></a>    <span class="f">(</span><a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1NUT1BfUEVORElOR18w"><span class="b">JOBCTL_STOP_PENDING</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_Sk9CQ1RMX1RSQVBfTUFTS18w"><span class="b">JOBCTL_TRAP_MASK</span></a><span class="f">)</span>
<a name="1770" /><span class="Maybe">    1770:</span> 
<a name="1771" /><span class="Maybe">    1771:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">task_set_jobctl_pending</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span>
<a name="1772" /><span class="Maybe">    1772:</span>                     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="1773" /><span class="Maybe">    1773:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_clear_jobctl_trapping</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span><span class="f">;</span>
<a name="1774" /><span class="Maybe">    1774:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">task_clear_jobctl_pending</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span>
<a name="1775" /><span class="Maybe">    1775:</span>                       <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="1776" /><span class="Maybe">    1776:</span> 
<a name="1777" /><span class="False">    1777:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PREEMPT_RCU</span>
<a name="1778" /><span class="False">    1778:</span> 
<a name="1779" /><span class="False">    1779:</span> <span class="f">#</span><span class="n">define</span> <span class="b">RCU_READ_UNLOCK_BLOCKED</span> <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="k">/* blocked while in RCU read-side. */</span>
<a name="1780" /><span class="False">    1780:</span> <span class="f">#</span><span class="n">define</span> <span class="b">RCU_READ_UNLOCK_NEED_QS</span> <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">1</span><span class="f">)</span> <span class="k">/* RCU core needs CPU response. */</span>
<a name="1781" /><span class="False">    1781:</span> 
<a name="1782" /><span class="False">    1782:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">rcu_copy_process</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1783" /><span class="False">    1783:</span> <span class="f">{</span>
<a name="1784" /><span class="False">    1784:</span>     <span class="b">p</span><span class="f">-&gt;</span><span class="b">rcu_read_lock_nesting</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1785" /><span class="False">    1785:</span>     <span class="b">p</span><span class="f">-&gt;</span><span class="b">rcu_read_unlock_special</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1786" /><span class="False">    1786:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_TREE_PREEMPT_RCU</span>
<a name="1787" /><span class="False">    1787:</span>     <span class="b">p</span><span class="f">-&gt;</span><span class="b">rcu_blocked_node</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1788" /><span class="False">    1788:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_TREE_PREEMPT_RCU */</span>
<a name="1789" /><span class="False">    1789:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_RCU_BOOST</span>
<a name="1790" /><span class="False">    1790:</span>     <span class="b">p</span><span class="f">-&gt;</span><span class="b">rcu_boost_mutex</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1791" /><span class="False">    1791:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_RCU_BOOST */</span>
<a name="1792" /><span class="False">    1792:</span>     <span class="b">INIT_LIST_HEAD</span><span class="f">(</span><span class="f">&amp;</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">rcu_node_entry</span><span class="f">)</span><span class="f">;</span>
<a name="1793" /><span class="False">    1793:</span> <span class="f">}</span>
<a name="1794" /><span class="False">    1794:</span> 
<a name="1795" /><span class="Maybe">    1795:</span> <span class="f">#</span><span class="n">else</span>
<a name="1796" /><span class="Maybe">    1796:</span> 
<a name="1797" /><span class="Maybe">    1797:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">rcu_copy_process</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1798" /><span class="Maybe">    1798:</span> <span class="f">{</span>
<a name="1799" /><span class="Maybe">    1799:</span> <span class="f">}</span>
<a name="1800" /><span class="Maybe">    1800:</span> 
<a name="1801" /><span class="Maybe">    1801:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1802" /><span class="Maybe">    1802:</span> 
<a name="1803" /><span class="Maybe">    1803:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">tsk_restore_flags</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span>
<a name="1804" /><span class="Maybe">    1804:</span>                 <span class="m">unsigned</span> <span class="m">long</span> <span class="b">orig_flags</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">flags</span><span class="f">)</span>
<a name="1805" /><span class="Maybe">    1805:</span> <span class="f">{</span>
<a name="1806" /><span class="Maybe">    1806:</span>     <span class="b">task</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><span class="b">flags</span><span class="f">;</span>
<a name="1807" /><span class="Maybe">    1807:</span>     <span class="b">task</span><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <span class="b">orig_flags</span> <span class="f">&amp;</span> <span class="b">flags</span><span class="f">;</span>
<a name="1808" /><span class="Maybe">    1808:</span> <span class="f">}</span>
<a name="1809" /><span class="Maybe">    1809:</span> 
<a name="1810" /><span class="Maybe">    1810:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="1811" /><span class="Maybe">    1811:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">do_set_cpus_allowed</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span>
<a name="1812" /><span class="Maybe">    1812:</span>                    <span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">new_mask</span><span class="f">)</span><span class="f">;</span>
<a name="1813" /><span class="Maybe">    1813:</span> 
<a name="1814" /><span class="Maybe">    1814:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">set_cpus_allowed_ptr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span>
<a name="1815" /><span class="Maybe">    1815:</span>                 <span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">new_mask</span><span class="f">)</span><span class="f">;</span>
<a name="1816" /><span class="False">    1816:</span> <span class="f">#</span><span class="n">else</span>
<a name="1817" /><span class="False">    1817:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">do_set_cpus_allowed</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span>
<a name="1818" /><span class="False">    1818:</span>                       <span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">new_mask</span><span class="f">)</span>
<a name="1819" /><span class="False">    1819:</span> <span class="f">{</span>
<a name="1820" /><span class="False">    1820:</span> <span class="f">}</span>
<a name="1821" /><span class="False">    1821:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">set_cpus_allowed_ptr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span>
<a name="1822" /><span class="False">    1822:</span>                        <span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">new_mask</span><span class="f">)</span>
<a name="1823" /><span class="False">    1823:</span> <span class="f">{</span>
<a name="1824" /><span class="False">    1824:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="cpu.c_macros_ref.html#_Y3B1bWFza190ZXN0X2NwdV8w"><span class="b">cpumask_test_cpu</span></a><span class="f">(</span><span class="c">0</span><span class="f">,</span> <span class="b">new_mask</span><span class="f">)</span><span class="f">)</span>
<a name="1825" /><span class="False">    1825:</span>         <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1826" /><span class="False">    1826:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1827" /><span class="False">    1827:</span> <span class="f">}</span>
<a name="1828" /><span class="Maybe">    1828:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1829" /><span class="Maybe">    1829:</span> 
<a name="1830" /><span class="Maybe">    1830:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX05PX0haX0NPTU1PTl8w"><span class="b">CONFIG_NO_HZ_COMMON</span></a>
<a name="1831" /><span class="Maybe">    1831:</span> <span class="m">void</span> <span class="b">calc_load_enter_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1832" /><span class="Maybe">    1832:</span> <span class="m">void</span> <span class="b">calc_load_exit_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1833" /><span class="False">    1833:</span> <span class="f">#</span><span class="n">else</span>
<a name="1834" /><span class="False">    1834:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">calc_load_enter_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1835" /><span class="False">    1835:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">calc_load_exit_idle</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1836" /><span class="Maybe">    1836:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_NO_HZ_COMMON */</span>
<a name="1837" /><span class="Maybe">    1837:</span> 
<a name="1838" /><span class="Maybe">    1838:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">CONFIG_CPUMASK_OFFSTACK</span>
<a name="1839" /><span class="Maybe">    1839:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">set_cpus_allowed</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="b">cpumask_t</span> <span class="b">new_mask</span><span class="f">)</span>
<a name="1840" /><span class="Maybe">    1840:</span> <span class="f">{</span>
<a name="1841" /><span class="Maybe">    1841:</span>     <span class="m">return</span> <span class="b">set_cpus_allowed_ptr</span><span class="f">(</span><span class="b">p</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">new_mask</span><span class="f">)</span><span class="f">;</span>
<a name="1842" /><span class="Maybe">    1842:</span> <span class="f">}</span>
<a name="1843" /><span class="Maybe">    1843:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1844" /><span class="Maybe">    1844:</span> 
<a name="1845" /><span class="Maybe">    1845:</span> <span class="k">/*</span>
<a name="1846" /><span class="Maybe">    1846:</span> <span class="k"> * Do not use outside of architecture code which knows its limitations.</span>
<a name="1847" /><span class="Maybe">    1847:</span> <span class="k"> *</span>
<a name="1848" /><span class="Maybe">    1848:</span> <span class="k"> * sched_clock() has no promise of monotonicity or bounded drift between</span>
<a name="1849" /><span class="Maybe">    1849:</span> <span class="k"> * CPUs, use (which you should not) requires disabling IRQs.</span>
<a name="1850" /><span class="Maybe">    1850:</span> <span class="k"> *</span>
<a name="1851" /><span class="Maybe">    1851:</span> <span class="k"> * Please use one of the three interfaces below.</span>
<a name="1852" /><span class="Maybe">    1852:</span> <span class="k"> */</span>
<a name="1853" /><span class="Maybe">    1853:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="b">sched_clock</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1854" /><span class="Maybe">    1854:</span> <span class="k">/*</span>
<a name="1855" /><span class="Maybe">    1855:</span> <span class="k"> * See the comment in kernel/sched/clock.c</span>
<a name="1856" /><span class="Maybe">    1856:</span> <span class="k"> */</span>
<a name="1857" /><span class="Maybe">    1857:</span> <span class="m">extern</span> <span class="b">u64</span> <span class="b">cpu_clock</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1858" /><span class="Maybe">    1858:</span> <span class="m">extern</span> <span class="b">u64</span> <span class="b">local_clock</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1859" /><span class="Maybe">    1859:</span> <span class="m">extern</span> <span class="b">u64</span> <span class="b">sched_clock_cpu</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1860" /><span class="Maybe">    1860:</span> 
<a name="1861" /><span class="Maybe">    1861:</span> 
<a name="1862" /><span class="Maybe">    1862:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1863" /><span class="Maybe">    1863:</span> 
<a name="1864" /><span class="False">    1864:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0hBVkVfVU5TVEFCTEVfU0NIRURfQ0xPQ0tfMA__"><span class="b">CONFIG_HAVE_UNSTABLE_SCHED_CLOCK</span></a>
<a name="1865" /><span class="False">    1865:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_clock_tick</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="1866" /><span class="False">    1866:</span> <span class="f">{</span>
<a name="1867" /><span class="False">    1867:</span> <span class="f">}</span>
<a name="1868" /><span class="False">    1868:</span> 
<a name="1869" /><span class="False">    1869:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_clock_idle_sleep_event</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="1870" /><span class="False">    1870:</span> <span class="f">{</span>
<a name="1871" /><span class="False">    1871:</span> <span class="f">}</span>
<a name="1872" /><span class="False">    1872:</span> 
<a name="1873" /><span class="False">    1873:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_clock_idle_wakeup_event</span><span class="f">(</span><span class="b">u64</span> <span class="b">delta_ns</span><span class="f">)</span>
<a name="1874" /><span class="False">    1874:</span> <span class="f">{</span>
<a name="1875" /><span class="False">    1875:</span> <span class="f">}</span>
<a name="1876" /><span class="Maybe">    1876:</span> <span class="f">#</span><span class="n">else</span>
<a name="1877" /><span class="Maybe">    1877:</span> <span class="k">/*</span>
<a name="1878" /><span class="Maybe">    1878:</span> <span class="k"> * Architectures can set this to 1 if they have specified</span>
<a name="1879" /><span class="Maybe">    1879:</span> <span class="k"> * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig,</span>
<a name="1880" /><span class="Maybe">    1880:</span> <span class="k"> * but then during bootup it turns out that sched_clock()</span>
<a name="1881" /><span class="Maybe">    1881:</span> <span class="k"> * is reliable after all:</span>
<a name="1882" /><span class="Maybe">    1882:</span> <span class="k"> */</span>
<a name="1883" /><span class="Maybe">    1883:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sched_clock_stable</span><span class="f">;</span>
<a name="1884" /><span class="Maybe">    1884:</span> 
<a name="1885" /><span class="Maybe">    1885:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_tick</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1886" /><span class="Maybe">    1886:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_idle_sleep_event</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1887" /><span class="Maybe">    1887:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_idle_wakeup_event</span><span class="f">(</span><span class="b">u64</span> <span class="b">delta_ns</span><span class="f">)</span><span class="f">;</span>
<a name="1888" /><span class="Maybe">    1888:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1889" /><span class="Maybe">    1889:</span> 
<a name="1890" /><span class="False">    1890:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_IRQ_TIME_ACCOUNTING</span>
<a name="1891" /><span class="False">    1891:</span> <span class="k">/*</span>
<a name="1892" /><span class="False">    1892:</span> <span class="k"> * An i/f to runtime opt-in for irq time accounting based off of sched_clock.</span>
<a name="1893" /><span class="False">    1893:</span> <span class="k"> * The reason for this explicit opt-in is not to have perf penalty with</span>
<a name="1894" /><span class="False">    1894:</span> <span class="k"> * slow sched_clocks.</span>
<a name="1895" /><span class="False">    1895:</span> <span class="k"> */</span>
<a name="1896" /><span class="False">    1896:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">enable_sched_clock_irqtime</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1897" /><span class="False">    1897:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">disable_sched_clock_irqtime</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1898" /><span class="Maybe">    1898:</span> <span class="f">#</span><span class="n">else</span>
<a name="1899" /><span class="Maybe">    1899:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">enable_sched_clock_irqtime</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="1900" /><span class="Maybe">    1900:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">disable_sched_clock_irqtime</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="1901" /><span class="Maybe">    1901:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1902" /><span class="Maybe">    1902:</span> 
<a name="1903" /><span class="Maybe">    1903:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span>
<a name="1904" /><span class="Maybe">    1904:</span> <span class="b">task_sched_runtime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span><span class="f">;</span>
<a name="1905" /><span class="Maybe">    1905:</span> 
<a name="1906" /><span class="Maybe">    1906:</span> <span class="k">/* sched_exec is called by processes performing an exec */</span>
<a name="1907" /><span class="Maybe">    1907:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="1908" /><span class="Maybe">    1908:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_exec</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1909" /><span class="False">    1909:</span> <span class="f">#</span><span class="n">else</span>
<a name="1910" /><span class="False">    1910:</span> <span class="f">#</span><span class="n">define</span> <span class="b">sched_exec</span><span class="f">(</span><span class="f">)</span>   <span class="f">{</span><span class="f">}</span>
<a name="1911" /><span class="Maybe">    1911:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1912" /><span class="Maybe">    1912:</span> 
<a name="1913" /><span class="Maybe">    1913:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_idle_sleep_event</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1914" /><span class="Maybe">    1914:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_clock_idle_wakeup_event</span><span class="f">(</span><span class="b">u64</span> <span class="b">delta_ns</span><span class="f">)</span><span class="f">;</span>
<a name="1915" /><span class="Maybe">    1915:</span> 
<a name="1916" /><span class="Maybe">    1916:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0hPVFBMVUdfQ1BVXzA_"><span class="b">CONFIG_HOTPLUG_CPU</span></a>
<a name="1917" /><span class="Maybe">    1917:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">idle_task_exit</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1918" /><span class="False">    1918:</span> <span class="f">#</span><span class="n">else</span>
<a name="1919" /><span class="False">    1919:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">idle_task_exit</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="1920" /><span class="Maybe">    1920:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1921" /><span class="Maybe">    1921:</span> 
<a name="1922" /><span class="Maybe">    1922:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX05PX0haX0NPTU1PTl8w"><span class="b">CONFIG_NO_HZ_COMMON</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span>
<a name="1923" /><span class="Maybe">    1923:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">wake_up_nohz_cpu</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1924" /><span class="False">    1924:</span> <span class="f">#</span><span class="n">else</span>
<a name="1925" /><span class="False">    1925:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">wake_up_nohz_cpu</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1926" /><span class="Maybe">    1926:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1927" /><span class="Maybe">    1927:</span> 
<a name="1928" /><span class="False">    1928:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_NO_HZ_FULL</span>
<a name="1929" /><span class="False">    1929:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">sched_can_stop_tick</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1930" /><span class="False">    1930:</span> <span class="m">extern</span> <span class="b">u64</span> <span class="b">scheduler_tick_max_deferment</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1931" /><span class="Maybe">    1931:</span> <span class="f">#</span><span class="n">else</span>
<a name="1932" /><span class="Maybe">    1932:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">sched_can_stop_tick</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="m">false</span><span class="f">;</span> <span class="f">}</span>
<a name="1933" /><span class="Maybe">    1933:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1934" /><span class="Maybe">    1934:</span> 
<a name="1935" /><span class="False">    1935:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_SCHED_AUTOGROUP</span>
<a name="1936" /><span class="False">    1936:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_autogroup_create_attach</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1937" /><span class="False">    1937:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_autogroup_detach</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1938" /><span class="False">    1938:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_autogroup_fork</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span><span class="f">;</span>
<a name="1939" /><span class="False">    1939:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_autogroup_exit</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span><span class="f">;</span>
<a name="1940" /><span class="False">    1940:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BST0NfRlNfMA__"><span class="b">CONFIG_PROC_FS</span></a>
<a name="1941" /><span class="False">    1941:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">proc_sched_autogroup_show_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="b">m</span><span class="f">)</span><span class="f">;</span>
<a name="1942" /><span class="False">    1942:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">proc_sched_autogroup_set_nice</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">int</span> <span class="b">nice</span><span class="f">)</span><span class="f">;</span>
<a name="1943" /><span class="False">    1943:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1944" /><span class="Maybe">    1944:</span> <span class="f">#</span><span class="n">else</span>
<a name="1945" /><span class="Maybe">    1945:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_autogroup_create_attach</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1946" /><span class="Maybe">    1946:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_autogroup_detach</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1947" /><span class="Maybe">    1947:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_autogroup_fork</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1948" /><span class="Maybe">    1948:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sched_autogroup_exit</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="1949" /><span class="Maybe">    1949:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1950" /><span class="Maybe">    1950:</span> 
<a name="1951" /><span class="Maybe">    1951:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">yield_to</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">bool</span> <span class="b">preempt</span><span class="f">)</span><span class="f">;</span>
<a name="1952" /><span class="Maybe">    1952:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_user_nice</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">long</span> <span class="b">nice</span><span class="f">)</span><span class="f">;</span>
<a name="1953" /><span class="Maybe">    1953:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">task_prio</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1954" /><span class="Maybe">    1954:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">task_nice</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1955" /><span class="Maybe">    1955:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">can_nice</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">const</span> <span class="m">int</span> <span class="b">nice</span><span class="f">)</span><span class="f">;</span>
<a name="1956" /><span class="Maybe">    1956:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">task_curr</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1957" /><span class="Maybe">    1957:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">idle_cpu</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1958" /><span class="Maybe">    1958:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sched_setscheduler</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span>
<a name="1959" /><span class="Maybe">    1959:</span>                   <span class="m">const</span> <span class="m">struct</span> <span class="b">sched_param</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1960" /><span class="Maybe">    1960:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sched_setscheduler_nocheck</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span>
<a name="1961" /><span class="Maybe">    1961:</span>                       <span class="m">const</span> <span class="m">struct</span> <span class="b">sched_param</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1962" /><span class="Maybe">    1962:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">idle_task</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1963" /><span class="Maybe">    1963:</span> <span class="k">/**</span>
<a name="1964" /><span class="Maybe">    1964:</span> <span class="k"> * is_idle_task - is the specified task an idle task?</span>
<a name="1965" /><span class="Maybe">    1965:</span> <span class="k"> * @p: the task in question.</span>
<a name="1966" /><span class="Maybe">    1966:</span> <span class="k"> *</span>
<a name="1967" /><span class="Maybe">    1967:</span> <span class="k"> * Return: 1 if @p is an idle task. 0 otherwise.</span>
<a name="1968" /><span class="Maybe">    1968:</span> <span class="k"> */</span>
<a name="1969" /><span class="Maybe">    1969:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">is_idle_task</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="1970" /><span class="Maybe">    1970:</span> <span class="f">{</span>
<a name="1971" /><span class="Maybe">    1971:</span>     <span class="m">return</span> <span class="b">p</span><span class="f">-&gt;</span><span class="b">pid</span> <span class="f">==</span> <span class="c">0</span><span class="f">;</span>
<a name="1972" /><span class="Maybe">    1972:</span> <span class="f">}</span>
<a name="1973" /><span class="Maybe">    1973:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">curr_task</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="1974" /><span class="Maybe">    1974:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_curr_task</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="1975" /><span class="Maybe">    1975:</span> 
<a name="1976" /><span class="Maybe">    1976:</span> <span class="m">void</span> <span class="b">yield</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1977" /><span class="Maybe">    1977:</span> 
<a name="1978" /><span class="Maybe">    1978:</span> <span class="k">/*</span>
<a name="1979" /><span class="Maybe">    1979:</span> <span class="k"> * The default (Linux) execution domain.</span>
<a name="1980" /><span class="Maybe">    1980:</span> <span class="k"> */</span>
<a name="1981" /><span class="Maybe">    1981:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">exec_domain</span>    <span class="b">default_exec_domain</span><span class="f">;</span>
<a name="1982" /><span class="Maybe">    1982:</span> 
<a name="1983" /><span class="Maybe">    1983:</span> <span class="m">union</span> <span class="b">thread_union</span> <span class="f">{</span>
<a name="1984" /><span class="Maybe">    1984:</span>     <span class="m">struct</span> <span class="b">thread_info</span> <span class="b">thread_info</span><span class="f">;</span>
<a name="1985" /><span class="Maybe">    1985:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">stack</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">/</span><span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">]</span><span class="f">;</span>
<a name="1986" /><span class="Maybe">    1986:</span> <span class="f">}</span><span class="f">;</span>
<a name="1987" /><span class="Maybe">    1987:</span> 
<a name="1988" /><span class="Maybe">    1988:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__HAVE_ARCH_KSTACK_END</span>
<a name="1989" /><span class="Maybe">    1989:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">kstack_end</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">addr</span><span class="f">)</span>
<a name="1990" /><span class="Maybe">    1990:</span> <span class="f">{</span>
<a name="1991" /><span class="Maybe">    1991:</span>     <span class="k">/* Reliable end of stack detection:</span>
<a name="1992" /><span class="Maybe">    1992:</span> <span class="k">     * Some APM bios versions misalign the stack</span>
<a name="1993" /><span class="Maybe">    1993:</span> <span class="k">     */</span>
<a name="1994" /><span class="Maybe">    1994:</span>     <span class="m">return</span> <span class="f">!</span><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="b">addr</span><span class="f">+</span><span class="m">sizeof</span><span class="f">(</span><span class="m">void</span><span class="f">*</span><span class="f">)</span><span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">-</span><span class="m">sizeof</span><span class="f">(</span><span class="m">void</span><span class="f">*</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1995" /><span class="Maybe">    1995:</span> <span class="f">}</span>
<a name="1996" /><span class="Maybe">    1996:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1997" /><span class="Maybe">    1997:</span> 
<a name="1998" /><span class="Maybe">    1998:</span> <span class="m">extern</span> <span class="m">union</span> <span class="b">thread_union</span> <span class="b">init_thread_union</span><span class="f">;</span>
<a name="1999" /><span class="Maybe">    1999:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="b">init_task</span><span class="f">;</span>
<a name="2000" /><span class="Maybe">    2000:</span> 
<a name="2001" /><span class="Maybe">    2001:</span> <span class="m">extern</span> <span class="m">struct</span>   <span class="b">mm_struct</span> <span class="b">init_mm</span><span class="f">;</span>
<a name="2002" /><span class="Maybe">    2002:</span> 
<a name="2003" /><span class="Maybe">    2003:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="b">init_pid_ns</span><span class="f">;</span>
<a name="2004" /><span class="Maybe">    2004:</span> 
<a name="2005" /><span class="Maybe">    2005:</span> <span class="k">/*</span>
<a name="2006" /><span class="Maybe">    2006:</span> <span class="k"> * find a task by one of its numerical ids</span>
<a name="2007" /><span class="Maybe">    2007:</span> <span class="k"> *</span>
<a name="2008" /><span class="Maybe">    2008:</span> <span class="k"> * find_task_by_pid_ns():</span>
<a name="2009" /><span class="Maybe">    2009:</span> <span class="k"> *      finds a task by its pid in the specified namespace</span>
<a name="2010" /><span class="Maybe">    2010:</span> <span class="k"> * find_task_by_vpid():</span>
<a name="2011" /><span class="Maybe">    2011:</span> <span class="k"> *      finds a task by its virtual pid</span>
<a name="2012" /><span class="Maybe">    2012:</span> <span class="k"> *</span>
<a name="2013" /><span class="Maybe">    2013:</span> <span class="k"> * see also find_vpid() etc in include/linux/pid.h</span>
<a name="2014" /><span class="Maybe">    2014:</span> <span class="k"> */</span>
<a name="2015" /><span class="Maybe">    2015:</span> 
<a name="2016" /><span class="Maybe">    2016:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">find_task_by_vpid</span><span class="f">(</span><span class="b">pid_t</span> <span class="b">nr</span><span class="f">)</span><span class="f">;</span>
<a name="2017" /><span class="Maybe">    2017:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">find_task_by_pid_ns</span><span class="f">(</span><span class="b">pid_t</span> <span class="b">nr</span><span class="f">,</span>
<a name="2018" /><span class="Maybe">    2018:</span>         <span class="m">struct</span> <span class="b">pid_namespace</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="2019" /><span class="Maybe">    2019:</span> 
<a name="2020" /><span class="Maybe">    2020:</span> <span class="k">/* per-UID process charging. */</span>
<a name="2021" /><span class="Maybe">    2021:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span> <span class="b">alloc_uid</span><span class="f">(</span><span class="b">kuid_t</span><span class="f">)</span><span class="f">;</span>
<a name="2022" /><span class="Maybe">    2022:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span><span class="b">get_uid</span><span class="f">(</span><span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span><span class="b">u</span><span class="f">)</span>
<a name="2023" /><span class="Maybe">    2023:</span> <span class="f">{</span>
<a name="2024" /><span class="Maybe">    2024:</span>     <span class="b">atomic_inc</span><span class="f">(</span><span class="f">&amp;</span><span class="b">u</span><span class="f">-&gt;</span><span class="b">__count</span><span class="f">)</span><span class="f">;</span>
<a name="2025" /><span class="Maybe">    2025:</span>     <span class="m">return</span> <span class="b">u</span><span class="f">;</span>
<a name="2026" /><span class="Maybe">    2026:</span> <span class="f">}</span>
<a name="2027" /><span class="Maybe">    2027:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">free_uid</span><span class="f">(</span><span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2028" /><span class="Maybe">    2028:</span> 
<a name="2029" /><span class="Maybe">    2029:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="2030" /><span class="Maybe">    2030:</span> 
<a name="2031" /><span class="Maybe">    2031:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">xtime_update</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">ticks</span><span class="f">)</span><span class="f">;</span>
<a name="2032" /><span class="Maybe">    2032:</span> 
<a name="2033" /><span class="Maybe">    2033:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">wake_up_state</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="2034" /><span class="Maybe">    2034:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">wake_up_process</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2035" /><span class="Maybe">    2035:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">wake_up_new_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2036" /><span class="Maybe">    2036:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="2037" /><span class="Maybe">    2037:</span>  <span class="m">extern</span> <span class="m">void</span> <span class="b">kick_process</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2038" /><span class="False">    2038:</span> <span class="f">#</span><span class="n">else</span>
<a name="2039" /><span class="False">    2039:</span>  <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">kick_process</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="2040" /><span class="Maybe">    2040:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2041" /><span class="Maybe">    2041:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_fork</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">clone_flags</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2042" /><span class="Maybe">    2042:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sched_dead</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2043" /><span class="Maybe">    2043:</span> 
<a name="2044" /><span class="Maybe">    2044:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">proc_caches_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2045" /><span class="Maybe">    2045:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">flush_signals</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2046" /><span class="Maybe">    2046:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__flush_signals</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2047" /><span class="Maybe">    2047:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">ignore_signals</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2048" /><span class="Maybe">    2048:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">flush_signal_handlers</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <span class="b">force_default</span><span class="f">)</span><span class="f">;</span>
<a name="2049" /><span class="Maybe">    2049:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">dequeue_signal</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">sigset_t</span> <span class="f">*</span><span class="b">mask</span><span class="f">,</span> <span class="b">siginfo_t</span> <span class="f">*</span><span class="b">info</span><span class="f">)</span><span class="f">;</span>
<a name="2050" /><span class="Maybe">    2050:</span> 
<a name="2051" /><span class="Maybe">    2051:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">dequeue_signal_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">sigset_t</span> <span class="f">*</span><span class="b">mask</span><span class="f">,</span> <span class="b">siginfo_t</span> <span class="f">*</span><span class="b">info</span><span class="f">)</span>
<a name="2052" /><span class="Maybe">    2052:</span> <span class="f">{</span>
<a name="2053" /><span class="Maybe">    2053:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">flags</span><span class="f">;</span>
<a name="2054" /><span class="Maybe">    2054:</span>     <span class="m">int</span> <span class="b">ret</span><span class="f">;</span>
<a name="2055" /><span class="Maybe">    2055:</span> 
<a name="2056" /><span class="Maybe">    2056:</span>     <a href="cpu.c_macros_ref.html#_c3Bpbl9sb2NrX2lycXNhdmVfMA__"><span class="b">spin_lock_irqsave</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">sighand</span><span class="f">-&gt;</span><span class="b">siglock</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2057" /><span class="Maybe">    2057:</span>     <span class="b">ret</span> <span class="f">=</span> <span class="b">dequeue_signal</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">mask</span><span class="f">,</span> <span class="b">info</span><span class="f">)</span><span class="f">;</span>
<a name="2058" /><span class="Maybe">    2058:</span>     <span class="b">spin_unlock_irqrestore</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">sighand</span><span class="f">-&gt;</span><span class="b">siglock</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2059" /><span class="Maybe">    2059:</span> 
<a name="2060" /><span class="Maybe">    2060:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="2061" /><span class="Maybe">    2061:</span> <span class="f">}</span>
<a name="2062" /><span class="Maybe">    2062:</span> 
<a name="2063" /><span class="Maybe">    2063:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">block_all_signals</span><span class="f">(</span><span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">notifier</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">priv</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">priv</span><span class="f">,</span>
<a name="2064" /><span class="Maybe">    2064:</span>                   <span class="b">sigset_t</span> <span class="f">*</span><span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="2065" /><span class="Maybe">    2065:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">unblock_all_signals</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2066" /><span class="Maybe">    2066:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">release_task</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span> <span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2067" /><span class="Maybe">    2067:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">send_sig_info</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2068" /><span class="Maybe">    2068:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">force_sigsegv</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2069" /><span class="Maybe">    2069:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">force_sig_info</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2070" /><span class="Maybe">    2070:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__kill_pgrp_info</span><span class="f">(</span><span class="m">int</span> <span class="b">sig</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="b">info</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">pgrp</span><span class="f">)</span><span class="f">;</span>
<a name="2071" /><span class="Maybe">    2071:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kill_pid_info</span><span class="f">(</span><span class="m">int</span> <span class="b">sig</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="b">info</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">pid</span><span class="f">)</span><span class="f">;</span>
<a name="2072" /><span class="Maybe">    2072:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kill_pid_info_as_cred</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="f">,</span>
<a name="2073" /><span class="Maybe">    2073:</span>                 <span class="m">const</span> <span class="m">struct</span> <span class="b">cred</span> <span class="f">*</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="f">;</span>
<a name="2074" /><span class="Maybe">    2074:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kill_pgrp</span><span class="f">(</span><span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">pid</span><span class="f">,</span> <span class="m">int</span> <span class="b">sig</span><span class="f">,</span> <span class="m">int</span> <span class="b">priv</span><span class="f">)</span><span class="f">;</span>
<a name="2075" /><span class="Maybe">    2075:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kill_pid</span><span class="f">(</span><span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">pid</span><span class="f">,</span> <span class="m">int</span> <span class="b">sig</span><span class="f">,</span> <span class="m">int</span> <span class="b">priv</span><span class="f">)</span><span class="f">;</span>
<a name="2076" /><span class="Maybe">    2076:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kill_proc_info</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">,</span> <span class="b">pid_t</span><span class="f">)</span><span class="f">;</span>
<a name="2077" /><span class="Maybe">    2077:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="m">bool</span> <span class="b">do_notify_parent</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2078" /><span class="Maybe">    2078:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__wake_up_parent</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">parent</span><span class="f">)</span><span class="f">;</span>
<a name="2079" /><span class="Maybe">    2079:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">force_sig</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2080" /><span class="Maybe">    2080:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">send_sig</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2081" /><span class="Maybe">    2081:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">zap_other_threads</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2082" /><span class="Maybe">    2082:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">sigqueue</span> <span class="f">*</span><span class="b">sigqueue_alloc</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2083" /><span class="Maybe">    2083:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">sigqueue_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">sigqueue</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2084" /><span class="Maybe">    2084:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">send_sigqueue</span><span class="f">(</span><span class="m">struct</span> <span class="b">sigqueue</span> <span class="f">*</span><span class="f">,</span>  <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <span class="b">group</span><span class="f">)</span><span class="f">;</span>
<a name="2085" /><span class="Maybe">    2085:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_sigaction</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">k_sigaction</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">k_sigaction</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2086" /><span class="Maybe">    2086:</span> 
<a name="2087" /><span class="Maybe">    2087:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">restore_saved_sigmask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2088" /><span class="Maybe">    2088:</span> <span class="f">{</span>
<a name="2089" /><span class="Maybe">    2089:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">test_and_clear_restore_sigmask</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="2090" /><span class="Maybe">    2090:</span>         <span class="b">__set_current_blocked</span><span class="f">(</span><span class="f">&amp;</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">saved_sigmask</span><span class="f">)</span><span class="f">;</span>
<a name="2091" /><span class="Maybe">    2091:</span> <span class="f">}</span>
<a name="2092" /><span class="Maybe">    2092:</span> 
<a name="2093" /><span class="Maybe">    2093:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">sigset_t</span> <span class="f">*</span><span class="b">sigmask_to_save</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2094" /><span class="Maybe">    2094:</span> <span class="f">{</span>
<a name="2095" /><span class="Maybe">    2095:</span>     <span class="b">sigset_t</span> <span class="f">*</span><span class="b">res</span> <span class="f">=</span> <span class="f">&amp;</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">blocked</span><span class="f">;</span>
<a name="2096" /><span class="Maybe">    2096:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">test_restore_sigmask</span><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="2097" /><span class="Maybe">    2097:</span>         <span class="b">res</span> <span class="f">=</span> <span class="f">&amp;</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">saved_sigmask</span><span class="f">;</span>
<a name="2098" /><span class="Maybe">    2098:</span>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="2099" /><span class="Maybe">    2099:</span> <span class="f">}</span>
<a name="2100" /><span class="Maybe">    2100:</span> 
<a name="2101" /><span class="Maybe">    2101:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">kill_cad_pid</span><span class="f">(</span><span class="m">int</span> <span class="b">sig</span><span class="f">,</span> <span class="m">int</span> <span class="b">priv</span><span class="f">)</span>
<a name="2102" /><span class="Maybe">    2102:</span> <span class="f">{</span>
<a name="2103" /><span class="Maybe">    2103:</span>     <span class="m">return</span> <span class="b">kill_pid</span><span class="f">(</span><span class="b">cad_pid</span><span class="f">,</span> <span class="b">sig</span><span class="f">,</span> <span class="b">priv</span><span class="f">)</span><span class="f">;</span>
<a name="2104" /><span class="Maybe">    2104:</span> <span class="f">}</span>
<a name="2105" /><span class="Maybe">    2105:</span> 
<a name="2106" /><span class="Maybe">    2106:</span> <span class="k">/* These can be the second arg to send_sig_info/send_group_sig_info.  */</span>
<a name="2107" /><span class="Maybe">    2107:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0VORF9TSUdfTk9JTkZPXzA_"><span class="b">SEND_SIG_NOINFO</span></a> <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">)</span> <span class="c">0</span><span class="f">)</span>
<a name="2108" /><span class="Maybe">    2108:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0VORF9TSUdfUFJJVl8w"><span class="b">SEND_SIG_PRIV</span></a>    <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">)</span> <span class="c">1</span><span class="f">)</span>
<a name="2109" /><span class="Maybe">    2109:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0VORF9TSUdfRk9SQ0VEXzA_"><span class="b">SEND_SIG_FORCED</span></a>    <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">siginfo</span> <span class="f">*</span><span class="f">)</span> <span class="c">2</span><span class="f">)</span>
<a name="2110" /><span class="Maybe">    2110:</span> 
<a name="2111" /><span class="Maybe">    2111:</span> <span class="k">/*</span>
<a name="2112" /><span class="Maybe">    2112:</span> <span class="k"> * True if we are on the alternate signal stack.</span>
<a name="2113" /><span class="Maybe">    2113:</span> <span class="k"> */</span>
<a name="2114" /><span class="Maybe">    2114:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">on_sig_stack</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">sp</span><span class="f">)</span>
<a name="2115" /><span class="Maybe">    2115:</span> <span class="f">{</span>
<a name="2116" /><span class="False">    2116:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_STACK_GROWSUP</span>
<a name="2117" /><span class="False">    2117:</span>     <span class="m">return</span> <span class="b">sp</span> <span class="f">&gt;=</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span> <span class="f">&amp;&amp;</span>
<a name="2118" /><span class="False">    2118:</span>         <span class="b">sp</span> <span class="f">-</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span> <span class="f">&lt;</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_size</span><span class="f">;</span>
<a name="2119" /><span class="Maybe">    2119:</span> <span class="f">#</span><span class="n">else</span>
<a name="2120" /><span class="Maybe">    2120:</span>     <span class="m">return</span> <span class="b">sp</span> <span class="f">&gt;</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span> <span class="f">&amp;&amp;</span>
<a name="2121" /><span class="Maybe">    2121:</span>         <span class="b">sp</span> <span class="f">-</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span> <span class="f">&lt;=</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_size</span><span class="f">;</span>
<a name="2122" /><span class="Maybe">    2122:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2123" /><span class="Maybe">    2123:</span> <span class="f">}</span>
<a name="2124" /><span class="Maybe">    2124:</span> 
<a name="2125" /><span class="Maybe">    2125:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sas_ss_flags</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">sp</span><span class="f">)</span>
<a name="2126" /><span class="Maybe">    2126:</span> <span class="f">{</span>
<a name="2127" /><span class="Maybe">    2127:</span>     <span class="m">return</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_size</span> <span class="f">==</span> <span class="c">0</span> <span class="f">?</span> <a href="cpu.c_macros_ref.html#_U1NfRElTQUJMRV8w"><span class="b">SS_DISABLE</span></a>
<a name="2128" /><span class="Maybe">    2128:</span>         <span class="f">:</span> <span class="b">on_sig_stack</span><span class="f">(</span><span class="b">sp</span><span class="f">)</span> <span class="f">?</span> <a href="cpu.c_macros_ref.html#_U1NfT05TVEFDS18w"><span class="b">SS_ONSTACK</span></a> <span class="f">:</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2129" /><span class="Maybe">    2129:</span> <span class="f">}</span>
<a name="2130" /><span class="Maybe">    2130:</span> 
<a name="2131" /><span class="Maybe">    2131:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">sigsp</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">sp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">ksignal</span> <span class="f">*</span><span class="b">ksig</span><span class="f">)</span>
<a name="2132" /><span class="Maybe">    2132:</span> <span class="f">{</span>
<a name="2133" /><span class="Maybe">    2133:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="f">(</span><span class="b">ksig</span><span class="f">-&gt;</span><span class="b">ka</span><span class="f">.</span><span class="b">sa</span><span class="f">.</span><span class="b">sa_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U0FfT05TVEFDS18w"><span class="b">SA_ONSTACK</span></a><span class="f">)</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">!</span> <span class="b">sas_ss_flags</span><span class="f">(</span><span class="b">sp</span><span class="f">)</span><span class="f">)</span>
<a name="2134" /><span class="False">    2134:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_STACK_GROWSUP</span>
<a name="2135" /><span class="False">    2135:</span>         <span class="m">return</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span><span class="f">;</span>
<a name="2136" /><span class="Maybe">    2136:</span> <span class="f">#</span><span class="n">else</span>
<a name="2137" /><span class="Maybe">    2137:</span>         <span class="m">return</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_sp</span> <span class="f">+</span> <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">sas_ss_size</span><span class="f">;</span>
<a name="2138" /><span class="Maybe">    2138:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2139" /><span class="Maybe">    2139:</span>     <span class="m">return</span> <span class="b">sp</span><span class="f">;</span>
<a name="2140" /><span class="Maybe">    2140:</span> <span class="f">}</span>
<a name="2141" /><span class="Maybe">    2141:</span> 
<a name="2142" /><span class="Maybe">    2142:</span> <span class="k">/*</span>
<a name="2143" /><span class="Maybe">    2143:</span> <span class="k"> * Routines for handling mm_structs</span>
<a name="2144" /><span class="Maybe">    2144:</span> <span class="k"> */</span>
<a name="2145" /><span class="Maybe">    2145:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span> <span class="b">mm_alloc</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2146" /><span class="Maybe">    2146:</span> 
<a name="2147" /><span class="Maybe">    2147:</span> <span class="k">/* mmdrop drops the mm and the page tables */</span>
<a name="2148" /><span class="Maybe">    2148:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__mmdrop</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2149" /><span class="Maybe">    2149:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">mmdrop</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span> <span class="b">mm</span><span class="f">)</span>
<a name="2150" /><span class="Maybe">    2150:</span> <span class="f">{</span>
<a name="2151" /><span class="Maybe">    2151:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">atomic_dec_and_test</span><span class="f">(</span><span class="f">&amp;</span><span class="b">mm</span><span class="f">-&gt;</span><span class="b">mm_count</span><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="2152" /><span class="Maybe">    2152:</span>         <span class="b">__mmdrop</span><span class="f">(</span><span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="2153" /><span class="Maybe">    2153:</span> <span class="f">}</span>
<a name="2154" /><span class="Maybe">    2154:</span> 
<a name="2155" /><span class="Maybe">    2155:</span> <span class="k">/* mmput gets rid of the mappings and all user-space */</span>
<a name="2156" /><span class="Maybe">    2156:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">mmput</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2157" /><span class="Maybe">    2157:</span> <span class="k">/* Grab a reference to a task&apos;s mm, if it is not already going away */</span>
<a name="2158" /><span class="Maybe">    2158:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">get_task_mm</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">)</span><span class="f">;</span>
<a name="2159" /><span class="Maybe">    2159:</span> <span class="k">/*</span>
<a name="2160" /><span class="Maybe">    2160:</span> <span class="k"> * Grab a reference to a task&apos;s mm, if it is not already going away</span>
<a name="2161" /><span class="Maybe">    2161:</span> <span class="k"> * and ptrace_may_access with the mode parameter passed to it</span>
<a name="2162" /><span class="Maybe">    2162:</span> <span class="k"> * succeeds.</span>
<a name="2163" /><span class="Maybe">    2163:</span> <span class="k"> */</span>
<a name="2164" /><span class="Maybe">    2164:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm_access</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">task</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">)</span><span class="f">;</span>
<a name="2165" /><span class="Maybe">    2165:</span> <span class="k">/* Remove the current tasks stale references to the old mm_struct */</span>
<a name="2166" /><span class="Maybe">    2166:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">mm_release</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2167" /><span class="Maybe">    2167:</span> <span class="k">/* Allocate a new mm structure and copy contents from tsk-&gt;mm */</span>
<a name="2168" /><span class="Maybe">    2168:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">dup_mm</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2169" /><span class="Maybe">    2169:</span> 
<a name="2170" /><span class="Maybe">    2170:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">copy_thread</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span>
<a name="2171" /><span class="Maybe">    2171:</span>             <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2172" /><span class="Maybe">    2172:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">flush_thread</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2173" /><span class="Maybe">    2173:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">exit_thread</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2174" /><span class="Maybe">    2174:</span> 
<a name="2175" /><span class="Maybe">    2175:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">exit_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2176" /><span class="Maybe">    2176:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__cleanup_sighand</span><span class="f">(</span><span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2177" /><span class="Maybe">    2177:</span> 
<a name="2178" /><span class="Maybe">    2178:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">exit_itimers</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2179" /><span class="Maybe">    2179:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">flush_itimer_signals</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2180" /><span class="Maybe">    2180:</span> 
<a name="2181" /><span class="Maybe">    2181:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">do_group_exit</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2182" /><span class="Maybe">    2182:</span> 
<a name="2183" /><span class="Maybe">    2183:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">allow_signal</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2184" /><span class="Maybe">    2184:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">disallow_signal</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2185" /><span class="Maybe">    2185:</span> 
<a name="2186" /><span class="Maybe">    2186:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_execve</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span>
<a name="2187" /><span class="Maybe">    2187:</span>              <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span> <span class="m">const</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span>
<a name="2188" /><span class="Maybe">    2188:</span>              <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span> <span class="m">const</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2189" /><span class="Maybe">    2189:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">do_fork</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2190" /><span class="Maybe">    2190:</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">fork_idle</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2191" /><span class="Maybe">    2191:</span> <span class="m">extern</span> <span class="b">pid_t</span> <span class="b">kernel_thread</span><span class="f">(</span><span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fn</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">arg</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2192" /><span class="Maybe">    2192:</span> 
<a name="2193" /><span class="Maybe">    2193:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_task_comm</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">from</span><span class="f">)</span><span class="f">;</span>
<a name="2194" /><span class="Maybe">    2194:</span> <span class="m">extern</span> <span class="m">char</span> <span class="f">*</span><span class="b">get_task_comm</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="b">to</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2195" /><span class="Maybe">    2195:</span> 
<a name="2196" /><span class="Maybe">    2196:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="2197" /><span class="Maybe">    2197:</span> <span class="m">void</span> <span class="b">scheduler_ipi</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2198" /><span class="Maybe">    2198:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">wait_task_inactive</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">long</span> <span class="b">match_state</span><span class="f">)</span><span class="f">;</span>
<a name="2199" /><span class="False">    2199:</span> <span class="f">#</span><span class="n">else</span>
<a name="2200" /><span class="False">    2200:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">scheduler_ipi</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="2201" /><span class="False">    2201:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">wait_task_inactive</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span>
<a name="2202" /><span class="False">    2202:</span>                            <span class="m">long</span> <span class="b">match_state</span><span class="f">)</span>
<a name="2203" /><span class="False">    2203:</span> <span class="f">{</span>
<a name="2204" /><span class="False">    2204:</span>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="2205" /><span class="False">    2205:</span> <span class="f">}</span>
<a name="2206" /><span class="Maybe">    2206:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2207" /><span class="Maybe">    2207:</span> 
<a name="2208" /><span class="Maybe">    2208:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bmV4dF90YXNrXzA_"><span class="b">next_task</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> \
<a name="2209" /><span class="Maybe">    2209:</span>     <a href="cpu.c_macros_ref.html#_bGlzdF9lbnRyeV9yY3VfMA__"><span class="b">list_entry_rcu</span></a><span class="f">(</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">tasks</span><span class="f">.</span><span class="b">next</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span><span class="f">,</span> <span class="b">tasks</span><span class="f">)</span>
<a name="2210" /><span class="Maybe">    2210:</span> 
<a name="2211" /><span class="Maybe">    2211:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_Zm9yX2VhY2hfcHJvY2Vzc18w"><span class="b">for_each_process</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> \
<a name="2212" /><span class="Maybe">    2212:</span>     <span class="m">for</span> <span class="f">(</span><span class="b">p</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">init_task</span> <span class="f">;</span> <span class="f">(</span><span class="b">p</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_bmV4dF90YXNrXzA_"><span class="b">next_task</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <span class="f">&amp;</span><span class="b">init_task</span> <span class="f">;</span> <span class="f">)</span>
<a name="2213" /><span class="Maybe">    2213:</span> 
<a name="2214" /><span class="Maybe">    2214:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">current_is_single_threaded</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2215" /><span class="Maybe">    2215:</span> 
<a name="2216" /><span class="Maybe">    2216:</span> <span class="k">/*</span>
<a name="2217" /><span class="Maybe">    2217:</span> <span class="k"> * Careful: do_each_thread/while_each_thread is a double loop so</span>
<a name="2218" /><span class="Maybe">    2218:</span> <span class="k"> *          &apos;break&apos; will not work as expected - use goto instead.</span>
<a name="2219" /><span class="Maybe">    2219:</span> <span class="k"> */</span>
<a name="2220" /><span class="Maybe">    2220:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZG9fZWFjaF90aHJlYWRfMA__"><span class="b">do_each_thread</span></a><span class="f">(</span><span class="b">g</span><span class="f">,</span> <span class="b">t</span><span class="f">)</span> \
<a name="2221" /><span class="Maybe">    2221:</span>     <span class="m">for</span> <span class="f">(</span><span class="b">g</span> <span class="f">=</span> <span class="b">t</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">init_task</span> <span class="f">;</span> <span class="f">(</span><span class="b">g</span> <span class="f">=</span> <span class="b">t</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_bmV4dF90YXNrXzA_"><span class="b">next_task</span></a><span class="f">(</span><span class="b">g</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <span class="f">&amp;</span><span class="b">init_task</span> <span class="f">;</span> <span class="f">)</span> <span class="m">do</span>
<a name="2222" /><span class="Maybe">    2222:</span> 
<a name="2223" /><span class="Maybe">    2223:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_d2hpbGVfZWFjaF90aHJlYWRfMA__"><span class="b">while_each_thread</span></a><span class="f">(</span><span class="b">g</span><span class="f">,</span> <span class="b">t</span><span class="f">)</span> \
<a name="2224" /><span class="Maybe">    2224:</span>     <span class="m">while</span> <span class="f">(</span><span class="f">(</span><span class="b">t</span> <span class="f">=</span> <span class="b">next_thread</span><span class="f">(</span><span class="b">t</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <span class="b">g</span><span class="f">)</span>
<a name="2225" /><span class="Maybe">    2225:</span> 
<a name="2226" /><span class="Maybe">    2226:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">get_nr_threads</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2227" /><span class="Maybe">    2227:</span> <span class="f">{</span>
<a name="2228" /><span class="Maybe">    2228:</span>     <span class="m">return</span> <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">nr_threads</span><span class="f">;</span>
<a name="2229" /><span class="Maybe">    2229:</span> <span class="f">}</span>
<a name="2230" /><span class="Maybe">    2230:</span> 
<a name="2231" /><span class="Maybe">    2231:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">thread_group_leader</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2232" /><span class="Maybe">    2232:</span> <span class="f">{</span>
<a name="2233" /><span class="Maybe">    2233:</span>     <span class="m">return</span> <span class="b">p</span><span class="f">-&gt;</span><span class="b">exit_signal</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">;</span>
<a name="2234" /><span class="Maybe">    2234:</span> <span class="f">}</span>
<a name="2235" /><span class="Maybe">    2235:</span> 
<a name="2236" /><span class="Maybe">    2236:</span> <span class="k">/* Do to the insanities of de_thread it is possible for a process</span>
<a name="2237" /><span class="Maybe">    2237:</span> <span class="k"> * to have the pid of the thread group leader without actually being</span>
<a name="2238" /><span class="Maybe">    2238:</span> <span class="k"> * the thread group leader.  For iteration through the pids in proc</span>
<a name="2239" /><span class="Maybe">    2239:</span> <span class="k"> * all we care about is that we have a task with the appropriate</span>
<a name="2240" /><span class="Maybe">    2240:</span> <span class="k"> * pid, we don&apos;t actually care if we have the right task.</span>
<a name="2241" /><span class="Maybe">    2241:</span> <span class="k"> */</span>
<a name="2242" /><span class="Maybe">    2242:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">has_group_leader_pid</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2243" /><span class="Maybe">    2243:</span> <span class="f">{</span>
<a name="2244" /><span class="Maybe">    2244:</span>     <span class="m">return</span> <span class="b">task_pid</span><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">==</span> <span class="b">p</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">leader_pid</span><span class="f">;</span>
<a name="2245" /><span class="Maybe">    2245:</span> <span class="f">}</span>
<a name="2246" /><span class="Maybe">    2246:</span> 
<a name="2247" /><span class="Maybe">    2247:</span> <span class="m">static</span> <span class="m">inline</span>
<a name="2248" /><span class="Maybe">    2248:</span> <span class="m">bool</span> <span class="b">same_thread_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p1</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p2</span><span class="f">)</span>
<a name="2249" /><span class="Maybe">    2249:</span> <span class="f">{</span>
<a name="2250" /><span class="Maybe">    2250:</span>     <span class="m">return</span> <span class="b">p1</span><span class="f">-&gt;</span><span class="b">signal</span> <span class="f">==</span> <span class="b">p2</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">;</span>
<a name="2251" /><span class="Maybe">    2251:</span> <span class="f">}</span>
<a name="2252" /><span class="Maybe">    2252:</span> 
<a name="2253" /><span class="Maybe">    2253:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">next_thread</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2254" /><span class="Maybe">    2254:</span> <span class="f">{</span>
<a name="2255" /><span class="Maybe">    2255:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_bGlzdF9lbnRyeV9yY3VfMA__"><span class="b">list_entry_rcu</span></a><span class="f">(</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">thread_group</span><span class="f">.</span><span class="b">next</span><span class="f">,</span>
<a name="2256" /><span class="Maybe">    2256:</span>                   <span class="m">struct</span> <span class="b">task_struct</span><span class="f">,</span> <span class="b">thread_group</span><span class="f">)</span><span class="f">;</span>
<a name="2257" /><span class="Maybe">    2257:</span> <span class="f">}</span>
<a name="2258" /><span class="Maybe">    2258:</span> 
<a name="2259" /><span class="Maybe">    2259:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">thread_group_empty</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2260" /><span class="Maybe">    2260:</span> <span class="f">{</span>
<a name="2261" /><span class="Maybe">    2261:</span>     <span class="m">return</span> <span class="b">list_empty</span><span class="f">(</span><span class="f">&amp;</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">thread_group</span><span class="f">)</span><span class="f">;</span>
<a name="2262" /><span class="Maybe">    2262:</span> <span class="f">}</span>
<a name="2263" /><span class="Maybe">    2263:</span> 
<a name="2264" /><span class="Maybe">    2264:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZGVsYXlfZ3JvdXBfbGVhZGVyXzA_"><span class="b">delay_group_leader</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> \
<a name="2265" /><span class="Maybe">    2265:</span>         <span class="f">(</span><span class="b">thread_group_leader</span><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">!</span><span class="b">thread_group_empty</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">)</span>
<a name="2266" /><span class="Maybe">    2266:</span> 
<a name="2267" /><span class="Maybe">    2267:</span> <span class="k">/*</span>
<a name="2268" /><span class="Maybe">    2268:</span> <span class="k"> * Protects -&gt;fs, -&gt;files, -&gt;mm, -&gt;group_info, -&gt;comm, keyring</span>
<a name="2269" /><span class="Maybe">    2269:</span> <span class="k"> * subscriptions and synchronises with wait4().  Also used in procfs.  Also</span>
<a name="2270" /><span class="Maybe">    2270:</span> <span class="k"> * pins the final release of task.io_context.  Also protects -&gt;cpuset and</span>
<a name="2271" /><span class="Maybe">    2271:</span> <span class="k"> * -&gt;cgroup.subsys[]. And -&gt;vfork_done.</span>
<a name="2272" /><span class="Maybe">    2272:</span> <span class="k"> *</span>
<a name="2273" /><span class="Maybe">    2273:</span> <span class="k"> * Nests both inside and outside of read_lock(&amp;tasklist_lock).</span>
<a name="2274" /><span class="Maybe">    2274:</span> <span class="k"> * It must not be nested with write_lock_irq(&amp;tasklist_lock),</span>
<a name="2275" /><span class="Maybe">    2275:</span> <span class="k"> * neither inside nor outside.</span>
<a name="2276" /><span class="Maybe">    2276:</span> <span class="k"> */</span>
<a name="2277" /><span class="Maybe">    2277:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2278" /><span class="Maybe">    2278:</span> <span class="f">{</span>
<a name="2279" /><span class="Maybe">    2279:</span>     <span class="b">spin_lock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">alloc_lock</span><span class="f">)</span><span class="f">;</span>
<a name="2280" /><span class="Maybe">    2280:</span> <span class="f">}</span>
<a name="2281" /><span class="Maybe">    2281:</span> 
<a name="2282" /><span class="Maybe">    2282:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">task_unlock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2283" /><span class="Maybe">    2283:</span> <span class="f">{</span>
<a name="2284" /><span class="Maybe">    2284:</span>     <span class="b">spin_unlock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">alloc_lock</span><span class="f">)</span><span class="f">;</span>
<a name="2285" /><span class="Maybe">    2285:</span> <span class="f">}</span>
<a name="2286" /><span class="Maybe">    2286:</span> 
<a name="2287" /><span class="Maybe">    2287:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">*</span><span class="b">__lock_task_sighand</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="2288" /><span class="Maybe">    2288:</span>                             <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2289" /><span class="Maybe">    2289:</span> 
<a name="2290" /><span class="Maybe">    2290:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">*</span><span class="b">lock_task_sighand</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="2291" /><span class="Maybe">    2291:</span>                                <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">flags</span><span class="f">)</span>
<a name="2292" /><span class="Maybe">    2292:</span> <span class="f">{</span>
<a name="2293" /><span class="Maybe">    2293:</span>     <span class="m">struct</span> <span class="b">sighand_struct</span> <span class="f">*</span><span class="b">ret</span><span class="f">;</span>
<a name="2294" /><span class="Maybe">    2294:</span> 
<a name="2295" /><span class="Maybe">    2295:</span>     <span class="b">ret</span> <span class="f">=</span> <span class="b">__lock_task_sighand</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2296" /><span class="Maybe">    2296:</span>     <span class="f">(</span><span class="m">void</span><span class="f">)</span><a href="cpu.c_macros_ref.html#_X19jb25kX2xvY2tfMA__"><span class="b">__cond_lock</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">sighand</span><span class="f">-&gt;</span><span class="b">siglock</span><span class="f">,</span> <span class="b">ret</span><span class="f">)</span><span class="f">;</span>
<a name="2297" /><span class="Maybe">    2297:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="2298" /><span class="Maybe">    2298:</span> <span class="f">}</span>
<a name="2299" /><span class="Maybe">    2299:</span> 
<a name="2300" /><span class="Maybe">    2300:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">unlock_task_sighand</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="2301" /><span class="Maybe">    2301:</span>                         <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">flags</span><span class="f">)</span>
<a name="2302" /><span class="Maybe">    2302:</span> <span class="f">{</span>
<a name="2303" /><span class="Maybe">    2303:</span>     <span class="b">spin_unlock_irqrestore</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">sighand</span><span class="f">-&gt;</span><span class="b">siglock</span><span class="f">,</span> <span class="f">*</span><span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2304" /><span class="Maybe">    2304:</span> <span class="f">}</span>
<a name="2305" /><span class="Maybe">    2305:</span> 
<a name="2306" /><span class="Maybe">    2306:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NHUk9VUFNfMA__"><span class="b">CONFIG_CGROUPS</span></a>
<a name="2307" /><span class="Maybe">    2307:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_change_begin</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2308" /><span class="Maybe">    2308:</span> <span class="f">{</span>
<a name="2309" /><span class="Maybe">    2309:</span>     <span class="b">down_read</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">group_rwsem</span><span class="f">)</span><span class="f">;</span>
<a name="2310" /><span class="Maybe">    2310:</span> <span class="f">}</span>
<a name="2311" /><span class="Maybe">    2311:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_change_end</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2312" /><span class="Maybe">    2312:</span> <span class="f">{</span>
<a name="2313" /><span class="Maybe">    2313:</span>     <span class="b">up_read</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">group_rwsem</span><span class="f">)</span><span class="f">;</span>
<a name="2314" /><span class="Maybe">    2314:</span> <span class="f">}</span>
<a name="2315" /><span class="Maybe">    2315:</span> 
<a name="2316" /><span class="Maybe">    2316:</span> <span class="k">/**</span>
<a name="2317" /><span class="Maybe">    2317:</span> <span class="k"> * threadgroup_lock - lock threadgroup</span>
<a name="2318" /><span class="Maybe">    2318:</span> <span class="k"> * @tsk: member task of the threadgroup to lock</span>
<a name="2319" /><span class="Maybe">    2319:</span> <span class="k"> *</span>
<a name="2320" /><span class="Maybe">    2320:</span> <span class="k"> * Lock the threadgroup @tsk belongs to.  No new task is allowed to enter</span>
<a name="2321" /><span class="Maybe">    2321:</span> <span class="k"> * and member tasks aren&apos;t allowed to exit (as indicated by PF_EXITING) or</span>
<a name="2322" /><span class="Maybe">    2322:</span> <span class="k"> * change -&gt;group_leader/pid.  This is useful for cases where the threadgroup</span>
<a name="2323" /><span class="Maybe">    2323:</span> <span class="k"> * needs to stay stable across blockable operations.</span>
<a name="2324" /><span class="Maybe">    2324:</span> <span class="k"> *</span>
<a name="2325" /><span class="Maybe">    2325:</span> <span class="k"> * fork and exit paths explicitly call threadgroup_change_{begin|end}() for</span>
<a name="2326" /><span class="Maybe">    2326:</span> <span class="k"> * synchronization.  While held, no new task will be added to threadgroup</span>
<a name="2327" /><span class="Maybe">    2327:</span> <span class="k"> * and no existing live task will have its PF_EXITING set.</span>
<a name="2328" /><span class="Maybe">    2328:</span> <span class="k"> *</span>
<a name="2329" /><span class="Maybe">    2329:</span> <span class="k"> * de_thread() does threadgroup_change_{begin|end}() when a non-leader</span>
<a name="2330" /><span class="Maybe">    2330:</span> <span class="k"> * sub-thread becomes a new leader.</span>
<a name="2331" /><span class="Maybe">    2331:</span> <span class="k"> */</span>
<a name="2332" /><span class="Maybe">    2332:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2333" /><span class="Maybe">    2333:</span> <span class="f">{</span>
<a name="2334" /><span class="Maybe">    2334:</span>     <span class="b">down_write</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">group_rwsem</span><span class="f">)</span><span class="f">;</span>
<a name="2335" /><span class="Maybe">    2335:</span> <span class="f">}</span>
<a name="2336" /><span class="Maybe">    2336:</span> 
<a name="2337" /><span class="Maybe">    2337:</span> <span class="k">/**</span>
<a name="2338" /><span class="Maybe">    2338:</span> <span class="k"> * threadgroup_unlock - unlock threadgroup</span>
<a name="2339" /><span class="Maybe">    2339:</span> <span class="k"> * @tsk: member task of the threadgroup to unlock</span>
<a name="2340" /><span class="Maybe">    2340:</span> <span class="k"> *</span>
<a name="2341" /><span class="Maybe">    2341:</span> <span class="k"> * Reverse threadgroup_lock().</span>
<a name="2342" /><span class="Maybe">    2342:</span> <span class="k"> */</span>
<a name="2343" /><span class="Maybe">    2343:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_unlock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2344" /><span class="Maybe">    2344:</span> <span class="f">{</span>
<a name="2345" /><span class="Maybe">    2345:</span>     <span class="b">up_write</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">group_rwsem</span><span class="f">)</span><span class="f">;</span>
<a name="2346" /><span class="Maybe">    2346:</span> <span class="f">}</span>
<a name="2347" /><span class="False">    2347:</span> <span class="f">#</span><span class="n">else</span>
<a name="2348" /><span class="False">    2348:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_change_begin</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2349" /><span class="False">    2349:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_change_end</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2350" /><span class="False">    2350:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2351" /><span class="False">    2351:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">threadgroup_unlock</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2352" /><span class="Maybe">    2352:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2353" /><span class="Maybe">    2353:</span> 
<a name="2354" /><span class="Maybe">    2354:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__HAVE_THREAD_FUNCTIONS</span>
<a name="2355" /><span class="Maybe">    2355:</span> 
<a name="2356" /><span class="Maybe">    2356:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="b">task</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">stack</span><span class="f">)</span>
<a name="2357" /><span class="Maybe">    2357:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_dGFza19zdGFja19wYWdlXzA_"><span class="b">task_stack_page</span></a><span class="f">(</span><span class="b">task</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">task</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">stack</span><span class="f">)</span>
<a name="2358" /><span class="Maybe">    2358:</span> 
<a name="2359" /><span class="Maybe">    2359:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">setup_thread_stack</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">org</span><span class="f">)</span>
<a name="2360" /><span class="Maybe">    2360:</span> <span class="f">{</span>
<a name="2361" /><span class="Maybe">    2361:</span>     <span class="f">*</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">=</span> <span class="f">*</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">org</span><span class="f">)</span><span class="f">;</span>
<a name="2362" /><span class="Maybe">    2362:</span>     <a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">task</span> <span class="f">=</span> <span class="b">p</span><span class="f">;</span>
<a name="2363" /><span class="Maybe">    2363:</span> <span class="f">}</span>
<a name="2364" /><span class="Maybe">    2364:</span> 
<a name="2365" /><span class="Maybe">    2365:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">end_of_stack</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2366" /><span class="Maybe">    2366:</span> <span class="f">{</span>
<a name="2367" /><span class="Maybe">    2367:</span>     <span class="m">return</span> <span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2368" /><span class="Maybe">    2368:</span> <span class="f">}</span>
<a name="2369" /><span class="Maybe">    2369:</span> 
<a name="2370" /><span class="Maybe">    2370:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2371" /><span class="Maybe">    2371:</span> 
<a name="2372" /><span class="Maybe">    2372:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">object_is_on_stack</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">obj</span><span class="f">)</span>
<a name="2373" /><span class="Maybe">    2373:</span> <span class="f">{</span>
<a name="2374" /><span class="Maybe">    2374:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">stack</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_dGFza19zdGFja19wYWdlXzA_"><span class="b">task_stack_page</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">)</span><span class="f">;</span>
<a name="2375" /><span class="Maybe">    2375:</span> 
<a name="2376" /><span class="Maybe">    2376:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">obj</span> <span class="f">&gt;=</span> <span class="b">stack</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">(</span><span class="b">obj</span> <span class="f">&lt;</span> <span class="f">(</span><span class="b">stack</span> <span class="f">+</span> <a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2377" /><span class="Maybe">    2377:</span> <span class="f">}</span>
<a name="2378" /><span class="Maybe">    2378:</span> 
<a name="2379" /><span class="Maybe">    2379:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">thread_info_cache_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2380" /><span class="Maybe">    2380:</span> 
<a name="2381" /><span class="False">    2381:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_STACK_USAGE</span>
<a name="2382" /><span class="False">    2382:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">stack_not_used</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2383" /><span class="False">    2383:</span> <span class="f">{</span>
<a name="2384" /><span class="False">    2384:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">n</span> <span class="f">=</span> <span class="b">end_of_stack</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2385" /><span class="False">    2385:</span> 
<a name="2386" /><span class="False">    2386:</span>     <span class="m">do</span> <span class="f">{</span>     <span class="k">/* Skip over canary */</span>
<a name="2387" /><span class="False">    2387:</span>         <span class="b">n</span><span class="f">++</span><span class="f">;</span>
<a name="2388" /><span class="False">    2388:</span>     <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="f">!</span><span class="f">*</span><span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2389" /><span class="False">    2389:</span> 
<a name="2390" /><span class="False">    2390:</span>     <span class="m">return</span> <span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="b">n</span> <span class="f">-</span> <span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="b">end_of_stack</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2391" /><span class="False">    2391:</span> <span class="f">}</span>
<a name="2392" /><span class="Maybe">    2392:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2393" /><span class="Maybe">    2393:</span> 
<a name="2394" /><span class="Maybe">    2394:</span> <span class="k">/* set thread flags in other task&apos;s structures</span>
<a name="2395" /><span class="Maybe">    2395:</span> <span class="k"> * - see asm/thread_info.h for TIF_xxxx flags available</span>
<a name="2396" /><span class="Maybe">    2396:</span> <span class="k"> */</span>
<a name="2397" /><span class="Maybe">    2397:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_tsk_thread_flag</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">int</span> <span class="b">flag</span><span class="f">)</span>
<a name="2398" /><span class="Maybe">    2398:</span> <span class="f">{</span>
<a name="2399" /><span class="Maybe">    2399:</span>     <span class="b">set_ti_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">,</span> <span class="b">flag</span><span class="f">)</span><span class="f">;</span>
<a name="2400" /><span class="Maybe">    2400:</span> <span class="f">}</span>
<a name="2401" /><span class="Maybe">    2401:</span> 
<a name="2402" /><span class="Maybe">    2402:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">clear_tsk_thread_flag</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">int</span> <span class="b">flag</span><span class="f">)</span>
<a name="2403" /><span class="Maybe">    2403:</span> <span class="f">{</span>
<a name="2404" /><span class="Maybe">    2404:</span>     <span class="b">clear_ti_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">,</span> <span class="b">flag</span><span class="f">)</span><span class="f">;</span>
<a name="2405" /><span class="Maybe">    2405:</span> <span class="f">}</span>
<a name="2406" /><span class="Maybe">    2406:</span> 
<a name="2407" /><span class="Maybe">    2407:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">test_and_set_tsk_thread_flag</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">int</span> <span class="b">flag</span><span class="f">)</span>
<a name="2408" /><span class="Maybe">    2408:</span> <span class="f">{</span>
<a name="2409" /><span class="Maybe">    2409:</span>     <span class="m">return</span> <span class="b">test_and_set_ti_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">,</span> <span class="b">flag</span><span class="f">)</span><span class="f">;</span>
<a name="2410" /><span class="Maybe">    2410:</span> <span class="f">}</span>
<a name="2411" /><span class="Maybe">    2411:</span> 
<a name="2412" /><span class="Maybe">    2412:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">test_and_clear_tsk_thread_flag</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">int</span> <span class="b">flag</span><span class="f">)</span>
<a name="2413" /><span class="Maybe">    2413:</span> <span class="f">{</span>
<a name="2414" /><span class="Maybe">    2414:</span>     <span class="m">return</span> <span class="b">test_and_clear_ti_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">,</span> <span class="b">flag</span><span class="f">)</span><span class="f">;</span>
<a name="2415" /><span class="Maybe">    2415:</span> <span class="f">}</span>
<a name="2416" /><span class="Maybe">    2416:</span> 
<a name="2417" /><span class="Maybe">    2417:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">test_tsk_thread_flag</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">int</span> <span class="b">flag</span><span class="f">)</span>
<a name="2418" /><span class="Maybe">    2418:</span> <span class="f">{</span>
<a name="2419" /><span class="Maybe">    2419:</span>     <span class="m">return</span> <span class="b">test_ti_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">,</span> <span class="b">flag</span><span class="f">)</span><span class="f">;</span>
<a name="2420" /><span class="Maybe">    2420:</span> <span class="f">}</span>
<a name="2421" /><span class="Maybe">    2421:</span> 
<a name="2422" /><span class="Maybe">    2422:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_tsk_need_resched</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2423" /><span class="Maybe">    2423:</span> <span class="f">{</span>
<a name="2424" /><span class="Maybe">    2424:</span>     <span class="b">set_tsk_thread_flag</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span><a href="cpu.c_macros_ref.html#_VElGX05FRURfUkVTQ0hFRF8w"><span class="b">TIF_NEED_RESCHED</span></a><span class="f">)</span><span class="f">;</span>
<a name="2425" /><span class="Maybe">    2425:</span> <span class="f">}</span>
<a name="2426" /><span class="Maybe">    2426:</span> 
<a name="2427" /><span class="Maybe">    2427:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">clear_tsk_need_resched</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2428" /><span class="Maybe">    2428:</span> <span class="f">{</span>
<a name="2429" /><span class="Maybe">    2429:</span>     <span class="b">clear_tsk_thread_flag</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span><a href="cpu.c_macros_ref.html#_VElGX05FRURfUkVTQ0hFRF8w"><span class="b">TIF_NEED_RESCHED</span></a><span class="f">)</span><span class="f">;</span>
<a name="2430" /><span class="Maybe">    2430:</span> <span class="f">}</span>
<a name="2431" /><span class="Maybe">    2431:</span> 
<a name="2432" /><span class="Maybe">    2432:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">test_tsk_need_resched</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2433" /><span class="Maybe">    2433:</span> <span class="f">{</span>
<a name="2434" /><span class="Maybe">    2434:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">test_tsk_thread_flag</span><span class="f">(</span><span class="b">tsk</span><span class="f">,</span><a href="cpu.c_macros_ref.html#_VElGX05FRURfUkVTQ0hFRF8w"><span class="b">TIF_NEED_RESCHED</span></a><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2435" /><span class="Maybe">    2435:</span> <span class="f">}</span>
<a name="2436" /><span class="Maybe">    2436:</span> 
<a name="2437" /><span class="Maybe">    2437:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">restart_syscall</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2438" /><span class="Maybe">    2438:</span> <span class="f">{</span>
<a name="2439" /><span class="Maybe">    2439:</span>     <span class="b">set_tsk_thread_flag</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">,</span> <a href="cpu.c_macros_ref.html#_VElGX1NJR1BFTkRJTkdfMA__"><span class="b">TIF_SIGPENDING</span></a><span class="f">)</span><span class="f">;</span>
<a name="2440" /><span class="Maybe">    2440:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RVJFU1RBUlROT0lOVFJfMA__"><span class="b">ERESTARTNOINTR</span></a><span class="f">;</span>
<a name="2441" /><span class="Maybe">    2441:</span> <span class="f">}</span>
<a name="2442" /><span class="Maybe">    2442:</span> 
<a name="2443" /><span class="Maybe">    2443:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">signal_pending</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2444" /><span class="Maybe">    2444:</span> <span class="f">{</span>
<a name="2445" /><span class="Maybe">    2445:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">test_tsk_thread_flag</span><span class="f">(</span><span class="b">p</span><span class="f">,</span><a href="cpu.c_macros_ref.html#_VElGX1NJR1BFTkRJTkdfMA__"><span class="b">TIF_SIGPENDING</span></a><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2446" /><span class="Maybe">    2446:</span> <span class="f">}</span>
<a name="2447" /><span class="Maybe">    2447:</span> 
<a name="2448" /><span class="Maybe">    2448:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">__fatal_signal_pending</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2449" /><span class="Maybe">    2449:</span> <span class="f">{</span>
<a name="2450" /><span class="Maybe">    2450:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">sigismember</span><span class="f">(</span><span class="f">&amp;</span><span class="b">p</span><span class="f">-&gt;</span><span class="b">pending</span><span class="f">.</span><span class="b">signal</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_U0lHS0lMTF8w"><span class="b">SIGKILL</span></a><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2451" /><span class="Maybe">    2451:</span> <span class="f">}</span>
<a name="2452" /><span class="Maybe">    2452:</span> 
<a name="2453" /><span class="Maybe">    2453:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fatal_signal_pending</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2454" /><span class="Maybe">    2454:</span> <span class="f">{</span>
<a name="2455" /><span class="Maybe">    2455:</span>     <span class="m">return</span> <span class="b">signal_pending</span><span class="f">(</span><span class="b">p</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">__fatal_signal_pending</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2456" /><span class="Maybe">    2456:</span> <span class="f">}</span>
<a name="2457" /><span class="Maybe">    2457:</span> 
<a name="2458" /><span class="Maybe">    2458:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">signal_pending_state</span><span class="f">(</span><span class="m">long</span> <span class="b">state</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2459" /><span class="Maybe">    2459:</span> <span class="f">{</span>
<a name="2460" /><span class="Maybe">    2460:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="f">(</span><span class="b">state</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEFTS19JTlRFUlJVUFRJQkxFXzA_"><span class="b">TASK_INTERRUPTIBLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="2461" /><span class="Maybe">    2461:</span>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2462" /><span class="Maybe">    2462:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">signal_pending</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">)</span>
<a name="2463" /><span class="Maybe">    2463:</span>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2464" /><span class="Maybe">    2464:</span> 
<a name="2465" /><span class="Maybe">    2465:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">state</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VEFTS19JTlRFUlJVUFRJQkxFXzA_"><span class="b">TASK_INTERRUPTIBLE</span></a><span class="f">)</span> <span class="f">||</span> <span class="b">__fatal_signal_pending</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2466" /><span class="Maybe">    2466:</span> <span class="f">}</span>
<a name="2467" /><span class="Maybe">    2467:</span> 
<a name="2468" /><span class="Maybe">    2468:</span> <span class="k">/*</span>
<a name="2469" /><span class="Maybe">    2469:</span> <span class="k"> * cond_resched() and cond_resched_lock(): latency reduction via</span>
<a name="2470" /><span class="Maybe">    2470:</span> <span class="k"> * explicit rescheduling in places that are safe. The return</span>
<a name="2471" /><span class="Maybe">    2471:</span> <span class="k"> * value indicates whether a reschedule was done in fact.</span>
<a name="2472" /><span class="Maybe">    2472:</span> <span class="k"> * cond_resched_lock() will drop the spinlock before scheduling,</span>
<a name="2473" /><span class="Maybe">    2473:</span> <span class="k"> * cond_resched_softirq() will enable bhs before scheduling.</span>
<a name="2474" /><span class="Maybe">    2474:</span> <span class="k"> */</span>
<a name="2475" /><span class="Maybe">    2475:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">_cond_resched</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2476" /><span class="Maybe">    2476:</span> 
<a name="2477" /><span class="Maybe">    2477:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_Y29uZF9yZXNjaGVkXzA_"><span class="b">cond_resched</span></a><span class="f">(</span><span class="f">)</span> <span class="f">(</span><span class="f">{</span>            \
<a name="2478" /><span class="Maybe">    2478:</span>     <span class="b">__might_sleep</span><span class="f">(</span><span class="b">__FILE__</span><span class="f">,</span> <span class="b">__LINE__</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>    \
<a name="2479" /><span class="Maybe">    2479:</span>     <span class="b">_cond_resched</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>            \
<a name="2480" /><span class="Maybe">    2480:</span> <span class="f">}</span><span class="f">)</span>
<a name="2481" /><span class="Maybe">    2481:</span> 
<a name="2482" /><span class="Maybe">    2482:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__cond_resched_lock</span><span class="f">(</span><span class="b">spinlock_t</span> <span class="f">*</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>
<a name="2483" /><span class="Maybe">    2483:</span> 
<a name="2484" /><span class="False">    2484:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PREEMPT_COUNT</span>
<a name="2485" /><span class="False">    2485:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9MT0NLX09GRlNFVF8w"><span class="b">PREEMPT_LOCK_OFFSET</span></a>    <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9PRkZTRVRfMA__"><span class="b">PREEMPT_OFFSET</span></a>
<a name="2486" /><span class="Maybe">    2486:</span> <span class="f">#</span><span class="n">else</span>
<a name="2487" /><span class="Maybe">    2487:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9MT0NLX09GRlNFVF8w"><span class="b">PREEMPT_LOCK_OFFSET</span></a>    <span class="c">0</span>
<a name="2488" /><span class="Maybe">    2488:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2489" /><span class="Maybe">    2489:</span> 
<a name="2490" /><span class="Maybe">    2490:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y29uZF9yZXNjaGVkX2xvY2tfMA__"><span class="b">cond_resched_lock</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span> <span class="f">(</span><span class="f">{</span>                \
<a name="2491" /><span class="Maybe">    2491:</span>     <span class="b">__might_sleep</span><span class="f">(</span><span class="b">__FILE__</span><span class="f">,</span> <span class="b">__LINE__</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_UFJFRU1QVF9MT0NLX09GRlNFVF8w"><span class="b">PREEMPT_LOCK_OFFSET</span></a><span class="f">)</span><span class="f">;</span>    \
<a name="2492" /><span class="Maybe">    2492:</span>     <span class="b">__cond_resched_lock</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>                \
<a name="2493" /><span class="Maybe">    2493:</span> <span class="f">}</span><span class="f">)</span>
<a name="2494" /><span class="Maybe">    2494:</span> 
<a name="2495" /><span class="Maybe">    2495:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__cond_resched_softirq</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2496" /><span class="Maybe">    2496:</span> 
<a name="2497" /><span class="Maybe">    2497:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Y29uZF9yZXNjaGVkX3NvZnRpcnFfMA__"><span class="b">cond_resched_softirq</span></a><span class="f">(</span><span class="f">)</span> <span class="f">(</span><span class="f">{</span>                    \
<a name="2498" /><span class="Maybe">    2498:</span>     <span class="b">__might_sleep</span><span class="f">(</span><span class="b">__FILE__</span><span class="f">,</span> <span class="b">__LINE__</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_U09GVElSUV9ESVNBQkxFX09GRlNFVF8w"><span class="b">SOFTIRQ_DISABLE_OFFSET</span></a><span class="f">)</span><span class="f">;</span>    \
<a name="2499" /><span class="Maybe">    2499:</span>     <span class="b">__cond_resched_softirq</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>                    \
<a name="2500" /><span class="Maybe">    2500:</span> <span class="f">}</span><span class="f">)</span>
<a name="2501" /><span class="Maybe">    2501:</span> 
<a name="2502" /><span class="Maybe">    2502:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">cond_resched_rcu</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2503" /><span class="Maybe">    2503:</span> <span class="f">{</span>
<a name="2504" /><span class="Maybe">    2504:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DEBUG_ATOMIC_SLEEP</span><span class="f">)</span> <span class="f">||</span> <span class="f">!</span><span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_PREEMPT_RCU</span><span class="f">)</span>
<a name="2505" /><span class="Maybe">    2505:</span>     <span class="b">rcu_read_unlock</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2506" /><span class="Maybe">    2506:</span>     <a href="cpu.c_macros_ref.html#_Y29uZF9yZXNjaGVkXzA_"><span class="b">cond_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2507" /><span class="Maybe">    2507:</span>     <span class="b">rcu_read_lock</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2508" /><span class="Maybe">    2508:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2509" /><span class="Maybe">    2509:</span> <span class="f">}</span>
<a name="2510" /><span class="Maybe">    2510:</span> 
<a name="2511" /><span class="Maybe">    2511:</span> <span class="k">/*</span>
<a name="2512" /><span class="Maybe">    2512:</span> <span class="k"> * Does a critical section need to be broken due to another</span>
<a name="2513" /><span class="Maybe">    2513:</span> <span class="k"> * task waiting?: (technically does not depend on CONFIG_PREEMPT,</span>
<a name="2514" /><span class="Maybe">    2514:</span> <span class="k"> * but a general need for low latency)</span>
<a name="2515" /><span class="Maybe">    2515:</span> <span class="k"> */</span>
<a name="2516" /><span class="Maybe">    2516:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">spin_needbreak</span><span class="f">(</span><span class="b">spinlock_t</span> <span class="f">*</span><span class="b">lock</span><span class="f">)</span>
<a name="2517" /><span class="Maybe">    2517:</span> <span class="f">{</span>
<a name="2518" /><span class="False">    2518:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PREEMPT</span>
<a name="2519" /><span class="False">    2519:</span>     <span class="m">return</span> <span class="b">spin_is_contended</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>
<a name="2520" /><span class="Maybe">    2520:</span> <span class="f">#</span><span class="n">else</span>
<a name="2521" /><span class="Maybe">    2521:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2522" /><span class="Maybe">    2522:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2523" /><span class="Maybe">    2523:</span> <span class="f">}</span>
<a name="2524" /><span class="Maybe">    2524:</span> 
<a name="2525" /><span class="Maybe">    2525:</span> <span class="k">/*</span>
<a name="2526" /><span class="Maybe">    2526:</span> <span class="k"> * Idle thread specific functions to determine the need_resched</span>
<a name="2527" /><span class="Maybe">    2527:</span> <span class="k"> * polling state. We have two versions, one based on TS_POLLING in</span>
<a name="2528" /><span class="Maybe">    2528:</span> <span class="k"> * thread_info.status and one based on TIF_POLLING_NRFLAG in</span>
<a name="2529" /><span class="Maybe">    2529:</span> <span class="k"> * thread_info.flags</span>
<a name="2530" /><span class="Maybe">    2530:</span> <span class="k"> */</span>
<a name="2531" /><span class="Maybe">    2531:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_VFNfUE9MTElOR18w"><span class="b">TS_POLLING</span></a>
<a name="2532" /><span class="Maybe">    2532:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">tsk_is_polling</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2533" /><span class="Maybe">    2533:</span> <span class="f">{</span>
<a name="2534" /><span class="Maybe">    2534:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VFNfUE9MTElOR18w"><span class="b">TS_POLLING</span></a><span class="f">;</span>
<a name="2535" /><span class="Maybe">    2535:</span> <span class="f">}</span>
<a name="2536" /><span class="Maybe">    2536:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_set_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2537" /><span class="Maybe">    2537:</span> <span class="f">{</span>
<a name="2538" /><span class="Maybe">    2538:</span>     <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_VFNfUE9MTElOR18w"><span class="b">TS_POLLING</span></a><span class="f">;</span>
<a name="2539" /><span class="Maybe">    2539:</span> <span class="f">}</span>
<a name="2540" /><span class="Maybe">    2540:</span> 
<a name="2541" /><span class="Maybe">    2541:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_set_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2542" /><span class="Maybe">    2542:</span> <span class="f">{</span>
<a name="2543" /><span class="Maybe">    2543:</span>     <span class="b">__current_set_polling</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2544" /><span class="Maybe">    2544:</span> 
<a name="2545" /><span class="Maybe">    2545:</span>     <span class="k">/*</span>
<a name="2546" /><span class="Maybe">    2546:</span> <span class="k">     * Polling state must be visible before we test NEED_RESCHED,</span>
<a name="2547" /><span class="Maybe">    2547:</span> <span class="k">     * paired by resched_task()</span>
<a name="2548" /><span class="Maybe">    2548:</span> <span class="k">     */</span>
<a name="2549" /><span class="Maybe">    2549:</span>     <a href="cpu.c_macros_ref.html#_c21wX21iXzA_"><span class="b">smp_mb</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2550" /><span class="Maybe">    2550:</span> 
<a name="2551" /><span class="Maybe">    2551:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2552" /><span class="Maybe">    2552:</span> <span class="f">}</span>
<a name="2553" /><span class="Maybe">    2553:</span> 
<a name="2554" /><span class="Maybe">    2554:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_clr_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2555" /><span class="Maybe">    2555:</span> <span class="f">{</span>
<a name="2556" /><span class="Maybe">    2556:</span>     <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_VFNfUE9MTElOR18w"><span class="b">TS_POLLING</span></a><span class="f">;</span>
<a name="2557" /><span class="Maybe">    2557:</span> <span class="f">}</span>
<a name="2558" /><span class="Maybe">    2558:</span> 
<a name="2559" /><span class="Maybe">    2559:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_clr_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2560" /><span class="Maybe">    2560:</span> <span class="f">{</span>
<a name="2561" /><span class="Maybe">    2561:</span>     <span class="b">__current_clr_polling</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2562" /><span class="Maybe">    2562:</span> 
<a name="2563" /><span class="Maybe">    2563:</span>     <span class="k">/*</span>
<a name="2564" /><span class="Maybe">    2564:</span> <span class="k">     * Polling state must be visible before we test NEED_RESCHED,</span>
<a name="2565" /><span class="Maybe">    2565:</span> <span class="k">     * paired by resched_task()</span>
<a name="2566" /><span class="Maybe">    2566:</span> <span class="k">     */</span>
<a name="2567" /><span class="Maybe">    2567:</span>     <a href="cpu.c_macros_ref.html#_c21wX21iXzA_"><span class="b">smp_mb</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2568" /><span class="Maybe">    2568:</span> 
<a name="2569" /><span class="Maybe">    2569:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2570" /><span class="Maybe">    2570:</span> <span class="f">}</span>
<a name="2571" /><span class="False">    2571:</span> <span class="f">#</span><span class="n">elif</span> <span class="b">defined</span><span class="f">(</span><span class="b">TIF_POLLING_NRFLAG</span><span class="f">)</span>
<a name="2572" /><span class="False">    2572:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">tsk_is_polling</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2573" /><span class="False">    2573:</span> <span class="f">{</span>
<a name="2574" /><span class="False">    2574:</span>     <span class="m">return</span> <span class="b">test_tsk_thread_flag</span><span class="f">(</span><span class="b">p</span><span class="f">,</span> <span class="b">TIF_POLLING_NRFLAG</span><span class="f">)</span><span class="f">;</span>
<a name="2575" /><span class="False">    2575:</span> <span class="f">}</span>
<a name="2576" /><span class="False">    2576:</span> 
<a name="2577" /><span class="False">    2577:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_set_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2578" /><span class="False">    2578:</span> <span class="f">{</span>
<a name="2579" /><span class="False">    2579:</span>     <a href="cpu.c_macros_noref.html#_c2V0X3RocmVhZF9mbGFnXzA_"><span class="b">set_thread_flag</span></a><span class="f">(</span><span class="b">TIF_POLLING_NRFLAG</span><span class="f">)</span><span class="f">;</span>
<a name="2580" /><span class="False">    2580:</span> <span class="f">}</span>
<a name="2581" /><span class="False">    2581:</span> 
<a name="2582" /><span class="False">    2582:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_set_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2583" /><span class="False">    2583:</span> <span class="f">{</span>
<a name="2584" /><span class="False">    2584:</span>     <span class="b">__current_set_polling</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2585" /><span class="False">    2585:</span> 
<a name="2586" /><span class="False">    2586:</span>     <span class="k">/*</span>
<a name="2587" /><span class="False">    2587:</span> <span class="k">     * Polling state must be visible before we test NEED_RESCHED,</span>
<a name="2588" /><span class="False">    2588:</span> <span class="k">     * paired by resched_task()</span>
<a name="2589" /><span class="False">    2589:</span> <span class="k">     *</span>
<a name="2590" /><span class="False">    2590:</span> <span class="k">     * XXX: assumes set/clear bit are identical barrier wise.</span>
<a name="2591" /><span class="False">    2591:</span> <span class="k">     */</span>
<a name="2592" /><span class="False">    2592:</span>     <a href="cpu.c_macros_noref.html#_c21wX21iX19hZnRlcl9jbGVhcl9iaXRfMA__"><span class="b">smp_mb__after_clear_bit</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2593" /><span class="False">    2593:</span> 
<a name="2594" /><span class="False">    2594:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2595" /><span class="False">    2595:</span> <span class="f">}</span>
<a name="2596" /><span class="False">    2596:</span> 
<a name="2597" /><span class="False">    2597:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_clr_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2598" /><span class="False">    2598:</span> <span class="f">{</span>
<a name="2599" /><span class="False">    2599:</span>     <a href="cpu.c_macros_noref.html#_Y2xlYXJfdGhyZWFkX2ZsYWdfMA__"><span class="b">clear_thread_flag</span></a><span class="f">(</span><span class="b">TIF_POLLING_NRFLAG</span><span class="f">)</span><span class="f">;</span>
<a name="2600" /><span class="False">    2600:</span> <span class="f">}</span>
<a name="2601" /><span class="False">    2601:</span> 
<a name="2602" /><span class="False">    2602:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_clr_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2603" /><span class="False">    2603:</span> <span class="f">{</span>
<a name="2604" /><span class="False">    2604:</span>     <span class="b">__current_clr_polling</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2605" /><span class="False">    2605:</span> 
<a name="2606" /><span class="False">    2606:</span>     <span class="k">/*</span>
<a name="2607" /><span class="False">    2607:</span> <span class="k">     * Polling state must be visible before we test NEED_RESCHED,</span>
<a name="2608" /><span class="False">    2608:</span> <span class="k">     * paired by resched_task()</span>
<a name="2609" /><span class="False">    2609:</span> <span class="k">     */</span>
<a name="2610" /><span class="False">    2610:</span>     <a href="cpu.c_macros_noref.html#_c21wX21iX19hZnRlcl9jbGVhcl9iaXRfMA__"><span class="b">smp_mb__after_clear_bit</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2611" /><span class="False">    2611:</span> 
<a name="2612" /><span class="False">    2612:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2613" /><span class="False">    2613:</span> <span class="f">}</span>
<a name="2614" /><span class="False">    2614:</span> 
<a name="2615" /><span class="False">    2615:</span> <span class="f">#</span><span class="n">else</span>
<a name="2616" /><span class="False">    2616:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">tsk_is_polling</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="c">0</span><span class="f">;</span> <span class="f">}</span>
<a name="2617" /><span class="False">    2617:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_set_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="2618" /><span class="False">    2618:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__current_clr_polling</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="2619" /><span class="False">    2619:</span> 
<a name="2620" /><span class="False">    2620:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_set_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2621" /><span class="False">    2621:</span> <span class="f">{</span>
<a name="2622" /><span class="False">    2622:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2623" /><span class="False">    2623:</span> <span class="f">}</span>
<a name="2624" /><span class="False">    2624:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">current_clr_polling_and_test</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2625" /><span class="False">    2625:</span> <span class="f">{</span>
<a name="2626" /><span class="False">    2626:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2627" /><span class="False">    2627:</span> <span class="f">}</span>
<a name="2628" /><span class="Maybe">    2628:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2629" /><span class="Maybe">    2629:</span> 
<a name="2630" /><span class="Maybe">    2630:</span> <span class="m">static</span> <a href="cpu.c_macros_ref.html#_X19hbHdheXNfaW5saW5lXzA_"><span class="b">__always_inline</span></a> <span class="m">bool</span> <span class="b">need_resched</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="2631" /><span class="Maybe">    2631:</span> <span class="f">{</span>
<a name="2632" /><span class="Maybe">    2632:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGlmX25lZWRfcmVzY2hlZF8w"><span class="b">tif_need_resched</span></a><span class="f">(</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2633" /><span class="Maybe">    2633:</span> <span class="f">}</span>
<a name="2634" /><span class="Maybe">    2634:</span> 
<a name="2635" /><span class="Maybe">    2635:</span> <span class="k">/*</span>
<a name="2636" /><span class="Maybe">    2636:</span> <span class="k"> * Thread group CPU time accounting.</span>
<a name="2637" /><span class="Maybe">    2637:</span> <span class="k"> */</span>
<a name="2638" /><span class="Maybe">    2638:</span> <span class="m">void</span> <span class="b">thread_group_cputime</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_cputime</span> <span class="f">*</span><span class="b">times</span><span class="f">)</span><span class="f">;</span>
<a name="2639" /><span class="Maybe">    2639:</span> <span class="m">void</span> <span class="b">thread_group_cputimer</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_cputime</span> <span class="f">*</span><span class="b">times</span><span class="f">)</span><span class="f">;</span>
<a name="2640" /><span class="Maybe">    2640:</span> 
<a name="2641" /><span class="Maybe">    2641:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">thread_group_cputime_init</span><span class="f">(</span><span class="m">struct</span> <span class="b">signal_struct</span> <span class="f">*</span><span class="b">sig</span><span class="f">)</span>
<a name="2642" /><span class="Maybe">    2642:</span> <span class="f">{</span>
<a name="2643" /><span class="Maybe">    2643:</span>     <a href="cpu.c_macros_ref.html#_cmF3X3NwaW5fbG9ja19pbml0XzA_"><span class="b">raw_spin_lock_init</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">sig</span><span class="f">-&gt;</span><span class="b">cputimer</span><span class="f">.</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>
<a name="2644" /><span class="Maybe">    2644:</span> <span class="f">}</span>
<a name="2645" /><span class="Maybe">    2645:</span> 
<a name="2646" /><span class="Maybe">    2646:</span> <span class="k">/*</span>
<a name="2647" /><span class="Maybe">    2647:</span> <span class="k"> * Reevaluate whether the task has signals pending delivery.</span>
<a name="2648" /><span class="Maybe">    2648:</span> <span class="k"> * Wake the task if so.</span>
<a name="2649" /><span class="Maybe">    2649:</span> <span class="k"> * This is required every time the blocked sigset_t changes.</span>
<a name="2650" /><span class="Maybe">    2650:</span> <span class="k"> * callers must hold sighand-&gt;siglock.</span>
<a name="2651" /><span class="Maybe">    2651:</span> <span class="k"> */</span>
<a name="2652" /><span class="Maybe">    2652:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">recalc_sigpending_and_wake</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">)</span><span class="f">;</span>
<a name="2653" /><span class="Maybe">    2653:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">recalc_sigpending</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2654" /><span class="Maybe">    2654:</span> 
<a name="2655" /><span class="Maybe">    2655:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">signal_wake_up_state</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="2656" /><span class="Maybe">    2656:</span> 
<a name="2657" /><span class="Maybe">    2657:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">signal_wake_up</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span> <span class="m">bool</span> <span class="b">resume</span><span class="f">)</span>
<a name="2658" /><span class="Maybe">    2658:</span> <span class="f">{</span>
<a name="2659" /><span class="Maybe">    2659:</span>     <span class="b">signal_wake_up_state</span><span class="f">(</span><span class="b">t</span><span class="f">,</span> <span class="b">resume</span> <span class="f">?</span> <a href="cpu.c_macros_ref.html#_VEFTS19XQUtFS0lMTF8w"><span class="b">TASK_WAKEKILL</span></a> <span class="f">:</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2660" /><span class="Maybe">    2660:</span> <span class="f">}</span>
<a name="2661" /><span class="Maybe">    2661:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">ptrace_signal_wake_up</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span> <span class="m">bool</span> <span class="b">resume</span><span class="f">)</span>
<a name="2662" /><span class="Maybe">    2662:</span> <span class="f">{</span>
<a name="2663" /><span class="Maybe">    2663:</span>     <span class="b">signal_wake_up_state</span><span class="f">(</span><span class="b">t</span><span class="f">,</span> <span class="b">resume</span> <span class="f">?</span> <a href="cpu.c_macros_ref.html#_X19UQVNLX1RSQUNFRF8w"><span class="b">__TASK_TRACED</span></a> <span class="f">:</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2664" /><span class="Maybe">    2664:</span> <span class="f">}</span>
<a name="2665" /><span class="Maybe">    2665:</span> 
<a name="2666" /><span class="Maybe">    2666:</span> <span class="k">/*</span>
<a name="2667" /><span class="Maybe">    2667:</span> <span class="k"> * Wrappers for p-&gt;thread_info-&gt;cpu access. No-op on UP.</span>
<a name="2668" /><span class="Maybe">    2668:</span> <span class="k"> */</span>
<a name="2669" /><span class="Maybe">    2669:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="2670" /><span class="Maybe">    2670:</span> 
<a name="2671" /><span class="Maybe">    2671:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">task_cpu</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2672" /><span class="Maybe">    2672:</span> <span class="f">{</span>
<a name="2673" /><span class="Maybe">    2673:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_dGFza190aHJlYWRfaW5mb18w"><span class="b">task_thread_info</span></a><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">cpu</span><span class="f">;</span>
<a name="2674" /><span class="Maybe">    2674:</span> <span class="f">}</span>
<a name="2675" /><span class="Maybe">    2675:</span> 
<a name="2676" /><span class="Maybe">    2676:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">task_node</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2677" /><span class="Maybe">    2677:</span> <span class="f">{</span>
<a name="2678" /><span class="Maybe">    2678:</span>     <span class="m">return</span> <span class="b">cpu_to_node</span><span class="f">(</span><span class="b">task_cpu</span><span class="f">(</span><span class="b">p</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2679" /><span class="Maybe">    2679:</span> <span class="f">}</span>
<a name="2680" /><span class="Maybe">    2680:</span> 
<a name="2681" /><span class="Maybe">    2681:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_task_cpu</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="2682" /><span class="Maybe">    2682:</span> 
<a name="2683" /><span class="False">    2683:</span> <span class="f">#</span><span class="n">else</span>
<a name="2684" /><span class="False">    2684:</span> 
<a name="2685" /><span class="False">    2685:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">task_cpu</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2686" /><span class="False">    2686:</span> <span class="f">{</span>
<a name="2687" /><span class="False">    2687:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2688" /><span class="False">    2688:</span> <span class="f">}</span>
<a name="2689" /><span class="False">    2689:</span> 
<a name="2690" /><span class="False">    2690:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_task_cpu</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cpu</span><span class="f">)</span>
<a name="2691" /><span class="False">    2691:</span> <span class="f">{</span>
<a name="2692" /><span class="False">    2692:</span> <span class="f">}</span>
<a name="2693" /><span class="False">    2693:</span> 
<a name="2694" /><span class="Maybe">    2694:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_SMP */</span>
<a name="2695" /><span class="Maybe">    2695:</span> 
<a name="2696" /><span class="Maybe">    2696:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">sched_setaffinity</span><span class="f">(</span><span class="b">pid_t</span> <span class="b">pid</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">new_mask</span><span class="f">)</span><span class="f">;</span>
<a name="2697" /><span class="Maybe">    2697:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">sched_getaffinity</span><span class="f">(</span><span class="b">pid_t</span> <span class="b">pid</span><span class="f">,</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="2698" /><span class="Maybe">    2698:</span> 
<a name="2699" /><span class="Maybe">    2699:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0NHUk9VUF9TQ0hFRF8w"><span class="b">CONFIG_CGROUP_SCHED</span></a>
<a name="2700" /><span class="Maybe">    2700:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">task_group</span> <span class="b">root_task_group</span><span class="f">;</span>
<a name="2701" /><span class="Maybe">    2701:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_CGROUP_SCHED */</span>
<a name="2702" /><span class="Maybe">    2702:</span> 
<a name="2703" /><span class="Maybe">    2703:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">task_can_switch_user</span><span class="f">(</span><span class="m">struct</span> <span class="b">user_struct</span> <span class="f">*</span><span class="b">up</span><span class="f">,</span>
<a name="2704" /><span class="Maybe">    2704:</span>                     <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="2705" /><span class="Maybe">    2705:</span> 
<a name="2706" /><span class="Maybe">    2706:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1RBU0tfWEFDQ1RfMA__"><span class="b">CONFIG_TASK_XACCT</span></a>
<a name="2707" /><span class="Maybe">    2707:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">add_rchar</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">ssize_t</span> <span class="b">amt</span><span class="f">)</span>
<a name="2708" /><span class="Maybe">    2708:</span> <span class="f">{</span>
<a name="2709" /><span class="Maybe">    2709:</span>     <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">ioac</span><span class="f">.</span><span class="b">rchar</span> <span class="f">+=</span> <span class="b">amt</span><span class="f">;</span>
<a name="2710" /><span class="Maybe">    2710:</span> <span class="f">}</span>
<a name="2711" /><span class="Maybe">    2711:</span> 
<a name="2712" /><span class="Maybe">    2712:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">add_wchar</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">ssize_t</span> <span class="b">amt</span><span class="f">)</span>
<a name="2713" /><span class="Maybe">    2713:</span> <span class="f">{</span>
<a name="2714" /><span class="Maybe">    2714:</span>     <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">ioac</span><span class="f">.</span><span class="b">wchar</span> <span class="f">+=</span> <span class="b">amt</span><span class="f">;</span>
<a name="2715" /><span class="Maybe">    2715:</span> <span class="f">}</span>
<a name="2716" /><span class="Maybe">    2716:</span> 
<a name="2717" /><span class="Maybe">    2717:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inc_syscr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2718" /><span class="Maybe">    2718:</span> <span class="f">{</span>
<a name="2719" /><span class="Maybe">    2719:</span>     <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">ioac</span><span class="f">.</span><span class="b">syscr</span><span class="f">++</span><span class="f">;</span>
<a name="2720" /><span class="Maybe">    2720:</span> <span class="f">}</span>
<a name="2721" /><span class="Maybe">    2721:</span> 
<a name="2722" /><span class="Maybe">    2722:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inc_syscw</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2723" /><span class="Maybe">    2723:</span> <span class="f">{</span>
<a name="2724" /><span class="Maybe">    2724:</span>     <span class="b">tsk</span><span class="f">-&gt;</span><span class="b">ioac</span><span class="f">.</span><span class="b">syscw</span><span class="f">++</span><span class="f">;</span>
<a name="2725" /><span class="Maybe">    2725:</span> <span class="f">}</span>
<a name="2726" /><span class="False">    2726:</span> <span class="f">#</span><span class="n">else</span>
<a name="2727" /><span class="False">    2727:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">add_rchar</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">ssize_t</span> <span class="b">amt</span><span class="f">)</span>
<a name="2728" /><span class="False">    2728:</span> <span class="f">{</span>
<a name="2729" /><span class="False">    2729:</span> <span class="f">}</span>
<a name="2730" /><span class="False">    2730:</span> 
<a name="2731" /><span class="False">    2731:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">add_wchar</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span> <span class="b">ssize_t</span> <span class="b">amt</span><span class="f">)</span>
<a name="2732" /><span class="False">    2732:</span> <span class="f">{</span>
<a name="2733" /><span class="False">    2733:</span> <span class="f">}</span>
<a name="2734" /><span class="False">    2734:</span> 
<a name="2735" /><span class="False">    2735:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inc_syscr</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2736" /><span class="False">    2736:</span> <span class="f">{</span>
<a name="2737" /><span class="False">    2737:</span> <span class="f">}</span>
<a name="2738" /><span class="False">    2738:</span> 
<a name="2739" /><span class="False">    2739:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inc_syscw</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span>
<a name="2740" /><span class="False">    2740:</span> <span class="f">{</span>
<a name="2741" /><span class="False">    2741:</span> <span class="f">}</span>
<a name="2742" /><span class="Maybe">    2742:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2743" /><span class="Maybe">    2743:</span> 
<a name="2744" /><span class="False">    2744:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_VEFTS19TSVpFX09GXzA_"><span class="b">TASK_SIZE_OF</span></a>
<a name="2745" /><span class="False">    2745:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VEFTS19TSVpFX09GXzA_"><span class="b">TASK_SIZE_OF</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>    <a href="cpu.c_macros_noref.html#_VEFTS19TSVpFXzA_"><span class="b">TASK_SIZE</span></a>
<a name="2746" /><span class="Maybe">    2746:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2747" /><span class="Maybe">    2747:</span> 
<a name="2748" /><span class="False">    2748:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_MM_OWNER</span>
<a name="2749" /><span class="False">    2749:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">mm_update_next_owner</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="2750" /><span class="False">    2750:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">mm_init_owner</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span><span class="f">;</span>
<a name="2751" /><span class="Maybe">    2751:</span> <span class="f">#</span><span class="n">else</span>
<a name="2752" /><span class="Maybe">    2752:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">mm_update_next_owner</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span>
<a name="2753" /><span class="Maybe">    2753:</span> <span class="f">{</span>
<a name="2754" /><span class="Maybe">    2754:</span> <span class="f">}</span>
<a name="2755" /><span class="Maybe">    2755:</span> 
<a name="2756" /><span class="Maybe">    2756:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">mm_init_owner</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="2757" /><span class="Maybe">    2757:</span> <span class="f">{</span>
<a name="2758" /><span class="Maybe">    2758:</span> <span class="f">}</span>
<a name="2759" /><span class="Maybe">    2759:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_MM_OWNER */</span>
<a name="2760" /><span class="Maybe">    2760:</span> 
<a name="2761" /><span class="Maybe">    2761:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">task_rlimit</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="2762" /><span class="Maybe">    2762:</span>         <span class="m">unsigned</span> <span class="m">int</span> <span class="b">limit</span><span class="f">)</span>
<a name="2763" /><span class="Maybe">    2763:</span> <span class="f">{</span>
<a name="2764" /><span class="Maybe">    2764:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_QUNDRVNTX09OQ0VfMA__"><span class="b">ACCESS_ONCE</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">rlim</span><span class="f">[</span><span class="b">limit</span><span class="f">]</span><span class="f">.</span><span class="b">rlim_cur</span><span class="f">)</span><span class="f">;</span>
<a name="2765" /><span class="Maybe">    2765:</span> <span class="f">}</span>
<a name="2766" /><span class="Maybe">    2766:</span> 
<a name="2767" /><span class="Maybe">    2767:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">task_rlimit_max</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">,</span>
<a name="2768" /><span class="Maybe">    2768:</span>         <span class="m">unsigned</span> <span class="m">int</span> <span class="b">limit</span><span class="f">)</span>
<a name="2769" /><span class="Maybe">    2769:</span> <span class="f">{</span>
<a name="2770" /><span class="Maybe">    2770:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_QUNDRVNTX09OQ0VfMA__"><span class="b">ACCESS_ONCE</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">-&gt;</span><span class="b">signal</span><span class="f">-&gt;</span><span class="b">rlim</span><span class="f">[</span><span class="b">limit</span><span class="f">]</span><span class="f">.</span><span class="b">rlim_max</span><span class="f">)</span><span class="f">;</span>
<a name="2771" /><span class="Maybe">    2771:</span> <span class="f">}</span>
<a name="2772" /><span class="Maybe">    2772:</span> 
<a name="2773" /><span class="Maybe">    2773:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">rlimit</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">limit</span><span class="f">)</span>
<a name="2774" /><span class="Maybe">    2774:</span> <span class="f">{</span>
<a name="2775" /><span class="Maybe">    2775:</span>     <span class="m">return</span> <span class="b">task_rlimit</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">,</span> <span class="b">limit</span><span class="f">)</span><span class="f">;</span>
<a name="2776" /><span class="Maybe">    2776:</span> <span class="f">}</span>
<a name="2777" /><span class="Maybe">    2777:</span> 
<a name="2778" /><span class="Maybe">    2778:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">rlimit_max</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">limit</span><span class="f">)</span>
<a name="2779" /><span class="Maybe">    2779:</span> <span class="f">{</span>
<a name="2780" /><span class="Maybe">    2780:</span>     <span class="m">return</span> <span class="b">task_rlimit_max</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">,</span> <span class="b">limit</span><span class="f">)</span><span class="f">;</span>
<a name="2781" /><span class="Maybe">    2781:</span> <span class="f">}</span>
<a name="2782" /><span class="Maybe">    2782:</span> 
<a name="2783" /><span class="True">    2783:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2784" /><span class="True">    2784:</span> </pre>
  </body>
</html>
